Hasty Briefsbeta

Bilingual

Running TypeScript Natively in Node.js

10 months ago
  • #JavaScript
  • #TypeScript
  • #Node.js
  • Node.js v23.6.0 enables 'type stripping' by default for TypeScript syntax.
  • From v22.6.0, Node.js supports TypeScript via 'type stripping' with the --experimental-strip-types flag.
  • V22.7.0 added --experimental-transform-types for TypeScript-only syntax like enums and namespaces.
  • Type stripping is enabled by default from v23.6.0, but transformations still require --experimental-transform-types.
  • Future Node.js versions aim to support TypeScript without command line flags.
  • Current limitations exist, and Node.js TypeScript loader (Amaro) doesn't use tsconfig.json.
  • Recommended to configure tsconfig.json and use TypeScript 5.7+ for editor and tsc alignment.
  • Feature is experimental; contributions and bug reports are welcome.