For one, we added support for ECMAScript’s new Set methods. Additionally, we’ve adjusted the behavior of TypeScript’s new regular ex

Announcing TypeScript 5.5 RC

submited by
Style Pass
2024-06-07 06:30:15

For one, we added support for ECMAScript’s new Set methods. Additionally, we’ve adjusted the behavior of TypeScript’s new regular expression checking to be slightly more lenient, while still erroring on questionable escapes that are only allowed per ECMAScript’s Annex B.

We’ve also added and documented even more performance optimizations: notably, skipped checking in transpileModule and optimizations in how TypeScript filters contextual types. These optimizations can lead to faster build and iteration time in many common scenarios.

TypeScript’s control flow analysis does a great job of tracking how the type of a variable changes as it moves through your code:

In the past, this sort of type refinement was more difficult to apply to arrays. This would have been an error in all previous versions of TypeScript:

This code is perfectly fine: we’ve filtered all the undefined values out of the list. But TypeScript hasn’t been able to follow along.

Leave a Comment