3 ms·
What about using ts-node? You can run typescript files directly with that. I use it for my scripting purposes.
by campers 5y ago
What 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.