Node.js adds experimental support for TypeScript

The experimental flag –experimental-strip-types allows for the execution of TypeScript files in Node.js, transpiling the code into JavaScript without type checking. This meets the demand from users to run .ts files without external dependencies. The @swc/wasm-typescript tool was chosen for its simplicity and lack of additional toolchain requirements. It’s noted that some TypeScript features like enums may not be transformable initially. A massive shoutout is given to @kdy1 for releasing a swc version for use. Visit the PR changes in module.md for implementation details and limitations. Roadmap Refs: nodejs/loaders#217.

https://github.com/nodejs/node/pull/53725

To top