Open turadg opened 1 year ago
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.
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
()
which build tools remove as superfluous (example)@deprecated
tag works only in .ts + jsdoc and not with plain JS.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