3 ms·
Curious. When will JS tooling ecosystem support executing typescript by stripping the type information? Are there any plans to add generic soft type annotations
by parhamn 5y ago
Curious. When will JS tooling ecosystem support executing typescript by stripping the type information? Are there any plans to add generic soft type annotations to the spec? It’d be great to write these in TS without changing the runtime tooling.
- campers 5y agoWhat about using ts-node? You can run typescript files directly with that. I use it for my scripting purposes.
- parhamn 5y agoIt’s a great tool. It wouldn’t work in this case would it? Also, IIRC it checks types, doesn’t just strip (sometimes I prefer to just run the thing and do my type checking at the IDE/build level). Also still leaves the multiple tools problem.
- CGamesPlay 5y agoWell `tsc` is the program that "strips" types after checking them. To be clear what you're asking for is a JavaScript runtime that supports parsing types but ignoring any errors it finds? Is there any computer programing language that has this behavior?
- campers 5y agoYou can use the --transpile-only option to skip type checking. I'm going start using that myself for scripts I know are already good! Just tried it and makes a good difference to startup time.
- jeswin 5y agoYou can already do that with deno.
- rockwotj 5y agoI've found esbuild to be great for this: https://esbuild.github.io/content-types/#typescript https://esbuild.github.io/content-types/#typescript