Node.js v22.6.0, the latest model of the standard JavaScript runtime, has simply been launched with experimental TypeScript assist.
Node.js 22.60 introduces the --experimental-strips-type
flag for preliminary assist for TypeScript, Microsoft’s standard JavaScript variant that has syntax for varieties. The Node.js replace was launched August 6. Node.js downloads might be accessed from nodejs.org.
The TypeScript functionality strips kind annotations from .ts recordsdata, enabling them to run with out reworking TypeScript-specific syntax. The assist is presently restricted to inline kind annotations, and doesn’t embody options reminiscent of enums
or namespaces
. Moreover, express file extensions are required in import and require statements. The function additionally enforces the usage of the kind key phrase for kind imports to keep away from runtime errors, and is disabled for TypeScript in node-modules by default. The addition of TypeScript assist, although, places Node.js extra in step with the rival Deno runtime, which helps JavaScript, TypeScript, and WebAssembly.