Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
303 stars 191 forks source link

adopt TypeScript .ts syntax #5760

Open turadg opened 1 year ago

turadg commented 1 year ago

I don't think this is going to happen but I wanted a place to collect the benefits and blockers.

What is the Problem Being Solved?

We rely on TypeScript for Intellisense, refactoring support, and fast feedback on what will fail in tests. We use the JSDoc syntax in .js and not .ts syntax.

Kinks

Challenges

Description of the Design

Probably some form of Node module loader hook, such as https://github.com/esbuild-kit/esm-loader

Or a Node wrapping runtime: https://github.com/privatenumber/ts-runtime-comparison

There will be transpilation but audits should be of built bundles, which aren't minified.

Security Considerations

Test Plan

turadg commented 9 months ago

Progress in,

dckc commented 1 week ago

conversion to .cjs module format is problematic

case in point: https://github.com/Agoric/agoric-sdk/issues/9408#issuecomment-2183611504

here's hoping for a .ts compiler / build tool that erases the types and does nothing else; especially no conversion to .cjs. I gather esbuild is close.