Cloud

Node.js unveils experimental TypeScript support



Node.js v22.6.0, the newest version of the popular JavaScript runtime, has just been released with experimental TypeScript support.

Node.js 22.60 introduces the --experimental-strips-type flag for initial support for TypeScript, Microsoft’s popular JavaScript variant that has syntax for types. The Node.js update was released August 6. Node.js downloads can be accessed from nodejs.org.

The TypeScript capability strips type annotations from .ts files, enabling them to run without transforming TypeScript-specific syntax. The support is currently limited to inline type annotations, and does not include features such as enums or namespaces. Additionally, explicit file extensions are required in import and require statements. The feature also enforces the use of the type keyword for type imports to avoid runtime errors, and is disabled for TypeScript in node-modules by default. The addition of TypeScript support, though, puts Node.js more in line with the rival Deno runtime, which supports JavaScript, TypeScript, and WebAssembly.



READ SOURCE

This website uses cookies. By continuing to use this site, you accept our use of cookies.