TypeScript 5 - Smaller, Simpler, Faster
Written by Kay Ewbank   
Monday, 20 March 2023

TypeScript 5.0 has been released with a number of new features aimed at making it smaller, simpler, and faster.

TypeScript is a superset of JavaScript that adds optional static types which can be checked by the TypeScript compiler to catch common errors in your programs. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting to check for null and undefined.

The TypeScript team says TypeScript 5.0 contains lots of powerful changes across its code structure, data structures, and algorithmic implementations. What these all mean is that your entire experience should be faster.

The new version also has an implementation of the new decorators standard and better support for ESM (ECMAScript modules) projects in Node and bundlers. Decorators are an upcoming ECMAScript feature that can be used to customize classes and their members in a reusable way.

TypeScript 4.7 introduced options to model lookup rules for ECMAScript modules in Node.js, but the implementations had a lot of restrictions that other tools don’t really enforce. Most modern bundlers prefer an import condition, and to model how bundlers work, TypeScript 5 has introduced a new strategy that meets this need.

JSDoc functionality has been expanded with the addition of @overload Support in JSDoc. In TypeScript, you can specify overloads for a function to show that a function can be called with different arguments, and possibly return different results. They can restrict how callers can actually use our functions, and refine what results they’ll get back. TypeScript 5 now allows JSDoc to declare overloads with a new @overload tag. Each JSDoc comment with an @overload tag is treated as a distinct overload for the following function declaration.

TypeScript 5 is available now.

 

More Information

TypeScript On NuGet

TypeScript On GitHub

Related Articles

TypeScript 4.7 Adds Node.js ECMAScript Module Support

TypeScript 4.6 Improves Constructors

TypeScript 4.5 Adds Awaited

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Apache Arrow 21 Released
07/07/2025

Version 21 of Apache Arrow has been released, including the first official Swift implementation of the platform. Improvements to Arrow 21 include exposing gRPC in the Flight client builder and improve [ ... ]



Windows 11 Overtakes Windows 10 - But Not In Europe
08/07/2025

With the end of support of Windows 10 just three months away, Windows 11 has finally edged ahead of Windows 10 in terms of  Desktop Windows Version Market Share on a Worldwide Basis. In Europe, h [ ... ]


More News

pico book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 20 March 2023 )