TypeScript 4.7 adds ESM support in Node.js
TypeScript 4.7, now in a beta release, offers ECMAScript module (ESM) support for Node.js 12 as well as a multitude of coding enhancements.Unveiled April 8, TypeScript 4.7 is the latest planned version of Microsoft’s strongly typed JavaScript. TypeScript 4.7 backs ECMAScript module support in Node.js 12, something that had been planned for TypeScript 4.5 late last year but was delayed. [ Also on InfoWorld: Builder CEO: Where JavaScript is headed is super interesting ] Nightly-only support for ECMAScript modules in Node.js was rolled out in the TypeScript 4.5 timeframe. These modules enable reuse of code via packaging. Implementing this support has been difficult because Node.js was built on a different module system, CommonJS. TypeScript 4.7 adds this functionality with two module settings, node12 and nodenext. Feedback on this capability is sought and can be offered on GitHub.To read this article in full, please click here
TypeScript 4.7, now in a beta release, offers ECMAScript module (ESM) support for Node.js 12 as well as a multitude of coding enhancements.
Unveiled April 8, TypeScript 4.7 is the latest planned version of Microsoft’s strongly typed JavaScript. TypeScript 4.7 backs ECMAScript module support in Node.js 12, something that had been planned for TypeScript 4.5 late last year but was delayed.
Nightly-only support for ECMAScript modules in Node.js was rolled out in the TypeScript 4.5 timeframe. These modules enable reuse of code via packaging. Implementing this support has been difficult because Node.js was built on a different module system, CommonJS. TypeScript 4.7 adds this functionality with two module
settings, node12
and nodenext
. Feedback on this capability is sought and can be offered on GitHub.