TypeScript has recently released its latest version, TypeScript 5.0. The new release is focused on making the language smaller, simpler, and faster while bringing in several new features and improvements.
One of the most significant additions to TypeScript 5.0 is the implementation of the new decorators standard, which allows decorators to be placed before or after export and export default. This new functionality makes it easier to extend and modify classes and other constructs in the language.
The new version also includes better support for ESM projects in Node and bundlers, enabling library authors to control generic inference in new ways. Additionally, TypeScript 5.0 expands JSDoc functionality, simplifies configuration, and offers various other improvements. It also features speed, memory, and package size optimizations.
AIM Daily XO
Join our editors every weekday evening as they steer you through the most significant news of the day, introduce you to fresh perspectives, and provide unexpected moments of joy
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.
According to Microsoft, the most notable change in TypeScript 5.0 since the release candidate (RC) is that it now specifies a minimum Node.js version of 12.20 in the package.json file. Additionally, the specific numbers for speed benchmarks and package size deltas have been adjusted, and the names of some benchmarks have been modified for clarity.
Despite some breaking changes and deprecations for infrequently-used options, upgrading to TypeScript 5.0 is expected to be a smooth process for most developers. The new version can be obtained through NuGet or by using npm with the command “npm install -D typescript”. Developers can also follow the instructions for using a newer version of TypeScript in Visual Studio Code.
Download our Mobile App
As per Microsoft, TypeScript 5.0 contains lots of powerful changes across their code structure, data structures, and algorithmic implementations. “What these all mean is that your entire experience should be faster—not just running TypeScript but even installing it,” says Microsoft. The company has also revealed that work on TypeScript 5.1 is already underway, with plans available on GitHub.