Monday, January 27, 2025

node.js += TypeScript

Node.js Now Supports TypeScript By Default | Total TypeScript

Node 23.6 will soon be able to run TypeScript files without any extra configuration.

Practically, this means a few things:
  • You can create an index.ts file containing TS syntax, like type annotations.
  • You can run node index.ts with no further flags
  • Node will strip out the types using a version of swc, then run the resulting code.

No comments: