← English news
Priority 4/5

Node.js 22.12.0 LTS Released with Enhanced TypeScript Support and Type Stripping Flags

Node.js 22.12.0 LTS Released with Enhanced TypeScript Support and Type Stripping Flags

The OpenJS Foundation has officially released Node.js 22.12.0 as part of the Long Term Support line. This update significantly advances the direct execution of TypeScript files by introducing the --strip-typescript-types flag. This feature allows the runtime to automatically remove type annotations from source files during execution using the high-performance amaro library, effectively eliminating the immediate need for external build steps in many development scenarios. While the current implementation focuses on stripping types rather than performing type checking, it covers a wide range of standard TypeScript syntax including interfaces and type aliases. For more complex features such as Enums or Namespaces, the --experimental-transform-types flag remains necessary. This release also includes various bug fixes and performance improvements to ensure the reliability of the runtime in enterprise environments. For developers, this update simplifies the local development workflow and CI/CD pipelines by removing the overhead of pre-compilation steps for simple scripts and services. Organizations can now leverage TypeScript more seamlessly within the Node.js ecosystem without managing complex build configurations. It is recommended that teams test their existing TypeScript codebases with the new flags to assess compatibility and potential performance gains in their specific deployment environments.

Primary source

Open Node.js v22.12.0 (LTS) Release Notes ↗

This article summarizes the source. Check the original for full details and conditions.

Comparison

AspectBefore / AlternativeAfter / This
TypeScript ExecutionManual transpilation via tsc or ts-nodeDirect execution via --strip-typescript-types
Build StepRequired before running in Node.jsOptional for standard type syntax
Runtime DependencyRequires external transformersBuilt-in amaro-based stripping