[–] uncomplexity_ 1y ago ↗ So for example:node --experimental-strip-types ./src/example.tsIt will now be:node ./src/example.tsSome good reads:- https://nodejs.org/en/learn/typescript/run-natively- https://nodejs.org/api/cli.html#--experimental-strip-types
[–] dave4420 1y 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.
3 comments
[ 3.0 ms ] story [ 15.9 ms ] threadnode --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/api/cli.html#--experimental-strip-types
There is a further switch, not yet switched on by default, that performs these transformations.