- v22.18.0 and later
- v22.7.0 – v22.17.x
If your source code contains only erasable TypeScript syntax, you can execute TypeScript code without any flags:
--no-experimental-strip-types flag if needed:
--experimental-transform-types was added to enable TypeScript-only syntax that requires transformation, like enums and namespace.
Enabling
--experimental-transform-types automatically implies that --experimental-strip-types is enabled, so there’s no need to use both flags in the same command.Constraints
The support for TypeScript in Node.js has some constraints to keep in mind. You can get more information in the API docs.Configuration
The Node.js TypeScript loader (Amaro) does not need or usetsconfig.json to run TypeScript code.