Navigation
Search
|
Node.js unveils experimental TypeScript support
Thursday August 8, 2024. 09:55 PM , from InfoWorld
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. Also featured in the Node.js v22.60 update is initial support for network inspection. This also is an experimental feature, which developers must enable using the --experimental-network-inspection flag. With this feature enabled, developers can inspect network activities occurring within a JavaScript application. To use network inspection, developers can start a Node.js application with the following command: $ node --inspect-wait --experimental-network-inspection index.js Network inspection capabilities are in active development but currently limited to the http and https modules, the project said. Additionally, the Network tab in Chrome DevTools will not be available until the feature request on the Chrome DevTools side is addressed.
https://www.infoworld.com/article/3484820/node-js-unveils-experimental-typescript-support.html
Related News |
25 sources
Current Date
Nov, Sat 16 - 03:30 CET
|