TypeScript Steps Up its Game with Deferred Module Evaluation and More
Microsoft’s TypeScript is getting an update that’s set to make developers’ lives easier. The language superset has reached the release candidate stage, bringing with it support for deferred module evaluation and a preview of expandable hovers.
The latest version, TypeScript 5.9, follows hot on the heels of its July 8 beta and marks an important step forward in the evolution of this popular JavaScript superset. The new features are designed to improve performance, readability, and developer productivity.
Deferred Module Evaluation: A Game-Changer for Developers
One of the most significant improvements in TypeScript 5.9 is its support for ECMAScript’s deferred module evaluation. This means that developers can now import modules without immediately executing them and their dependencies, giving better control over when work and side effects occur.
This is particularly useful for conditionally loading modules with expensive or platform-specific initialization. It also improves startup performance by deferring module evaluation until features are actually needed.
Expandable Hovers: A Preview of Things to Come
The new version of TypeScript also includes a preview of expandable hovers, which offers “quick info verbosity.” When using an editor like Visual Studio Code, developers will now see + and – buttons on the left of hover tooltips. Clicking on the + button expands out types more deeply, while clicking on the – button returns to the previous view.
This feature addresses a common issue where quick info tooltips become too long and are truncated for readability. The language server also supports a configurable hover length, which can be set in VS Code via the js/ts.hover.maximumLength setting.
Other Improvements
TypeScript 5.9 includes several other improvements, including caching of intermediate instantiations to avoid unnecessary work and allocations. It also adds support for –module node20, giving developers a new way to model Node.js 20. Specifying –module node20 implies –target es2023, while –module nodenext implies –target esnext.
Finally, an updated minimal tsc –init command results in a leaner tsconfig.json file that omits commented-out settings and their descriptions.












What do you think?
It is nice to know your opinion. Leave a comment.