node --experimental-strip-types script.ts

Category: Node.js & npm/yarn

node --experimental-strip-types script.ts

Run TypeScript files with type stripping

Runs a .ts file directly by erasing type annotations at load time, no tsconfig or compile step needed. Only erasable syntax works, so enums and namespaces need --experimental-transform-types. Newer Node releases enable this behavior by default.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.