TypeScript 5.6, the latest update to Microsoft’s statically typed version of JavaScript, has reached the release candidate (RC) stage. This milestone follows a previous beta release and introduces several new features, adjustments, and improvements to the language. The TypeScript 5.6 RC, announced on August 23, includes a series of changes, such as renaming a number of types and reverting a modification to how the TypeScript language service searches for tsconfig.json
files. These updates aim to improve the developer experience and ensure that TypeScript continues to evolve in a way that is both efficient and practical for users.
One significant change in the RC is the reversal of the behavior regarding the language service’s search for tsconfig.json
files. Previously, the language service would search through every possible project file named tsconfig.json
within a project directory, which could lead to unintended behavior, such as opening multiple referenced projects. Microsoft decided to revert this change, acknowledging the inconvenience it caused, while exploring ways to reintroduce the behavior in TypeScript 5.7. This tweak improves the efficiency of the language service, ensuring that it doesn’t perform unnecessary checks that could slow down the development process.
Additionally, TypeScript 5.6 brings several improvements to type handling. A notable update is the renaming of the BuiltinIterator
type to IteratorObject
. This change comes with new type parameters and introduces subtypes such as ArrayIterator
and MapIterator
. These adjustments aim to provide more clarity and precision when dealing with iterators in TypeScript, making it easier for developers to work with complex data structures and iterate over values in a more intuitive manner.
The RC also introduces several other enhancements, such as the addition of the --stopOnBuildErrors
flag for --build
mode. This new flag halts builds if any errors are found, allowing developers to address issues early in the development process. Furthermore, new editor functionalities have been added, including direct support for commit characters and the ability to specify exclude patterns for auto-imports. These editor improvements, along with earlier changes introduced in the beta, such as disallowing nullish and truthy checks in certain situations, further refine TypeScript’s ability to catch bugs and streamline the development experience. With these updates, TypeScript 5.6 is shaping up to be a powerful release, offering new tools and features for developers.