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/api/cli.html#--experimental-strip-types
There is a further switch, not yet switched on by default, that performs these transformations.
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/api/cli.html#--experimental-strip-types