3 ms·
Node.js can now run TypeScript directly
- uncomplexity_ 2y agoSo for example: node --experimental-strip-types ./src/example.ts It will now be: node ./src/example.ts Some good reads: - https://nodejs.org/en/learn/typescript/run-natively https://nodejs.org/en/learn/typescript/run-natively - https://nodejs.org/api/cli.html#--experimental-strip-types https://nodejs.org/api/cli.html#--experimental-strip-types
- deleted 2y ago[deleted]
- dave4420 2y ago> By default Node.js will execute only files that contain no TypeScript features that require transformation, such as enums or namespaces. There is a further switch, not yet switched on by default, that performs these transformations.