Member-only story
What’s New in TypeScript 5.2?
The TypeScript 5.2 version is planned to be released on the 22th of August 🎉. You can learn more details about the release plan here.
In this article, I will highlight the most relevant new features. Here is the summary:
- The new
usingkeyword - Decorator Metadata
- Named and Anonymous Tuple Elements
- Generating signatures for unions of array members
As usual, you can follow any of the examples by using the TypeScript playground available here. The best way to learn is always to do it interactively.
The new using keyword
The ECMAScript explicit resource managment proposal reached Stage 3 status back in March. That means that it is now up to each vendor to implement it.
The purpose of this feature is to tackle a prevalent trend in software development concerning the duration and control of diverse resources (such as memory, I/O, etc.). Typically, this trend involves both acquiring a resource and having the capability to deliberately release crucial resources.
How it works
So what is the using keyword feature? A using declaration is a new block-scoped variable form that allows for the declaration of a disposable resource…

