VOOZH about

URL: https://www.infoq.com/news/2025/03/node-23-runs-typescript-natively/

⇱ Node.js 23.6 Now Runs TypeScript Natively - InfoQ


BT

InfoQ Homepage News Node.js 23.6 Now Runs TypeScript Natively

Node.js 23.6 Now Runs TypeScript Natively

Mar 09, 2025 1 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch
Listen to this article -  0:00

The Node team recently announced shipping TypeScript native support in Node 23.6. Node developers can now run TypeScript files without any extra configuration or flags. The feature, which was experimental in Node 22.6, is now stable. Native TypeScript support was among the most requested Node features by developers.

Node developers can now create an index.ts file, run node index.ts without additional flags, and Node will remove the TypeScript type annotations from the file and run the resulting JavaScript code.

Caveats apply. Node.js ignores tsconfig.json files and therefore features that depend on settings within tsconfig.json, such as paths or converting newer JavaScript syntax to older standards (e.g., decorators, a stage 3 proposal), are intentionally unsupported. Similarly, there is no support for JSX files.

Node also does not support TypeScript syntaxes that require JavaScript code generation. As Node will simply replace inline types with whitespaces (i.e., type stripping), developers can run TypeScript code without needing source maps. However, some TypeScript constructs, which have runtime semantics or require JavaScript code generation, will not be supported. The set of supported TypeScript syntax is dubbed erasable syntax. The latest release of TypeScript (i.e.,, TypeScript 5.8) adds a --erasableSyntaxOnly flag to support this workflow.

The Node.js documentation lists the most important unsupported syntax:

The most prominent features that require transformation are:

  • Enum declarations
  • namespace with runtime code
  • legacy module with runtime code
  • parameter properties
  • import aliases

Native TypeScript support brings Node closer to alternative TypeScript-native runtimes such as Deno or Bun. The Deno team detailed in a blog post the additional features still offered only by Deno, among which tsconfig support and distributing TypeScript without transpilation.

Developers are encouraged to review the extensive discussion of the feature roadmap, which includes the rationale behind the choice of tradeoffs made by the team and the feedback from developers.

About the Author

Bruno Couriol

Show moreShow less

This content is in the Web Development topic

Related Topics:

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

BT