TypeScript 5.6, the latest iteration of Microsoft’s strongly typed superset of JavaScript, has officially entered the release candidate (RC) stage. This release introduces several important updates, including the renaming of types and a change to how the TypeScript language service searches for configuration files. The RC stage follows the earlier beta version released on July 26, and includes enhancements such as stricter checks for nullish and truthy values in syntax that consistently resolves in one way.
The TypeScript 5.6 RC, announced on August 23, can now be installed via NPM with the command npm install -D typescript@rc
. This marks a significant milestone in the development cycle, bringing the language closer to its stable release. With the RC, Microsoft has made important fixes and adjustments based on feedback from the beta stage, ensuring smoother developer experiences.
One notable change in the RC is the adjustment made to how the TypeScript language service searches for tsconfig.json files. The previous approach would have caused the service to search through every possible project file, potentially opening numerous referenced projects, which could be inefficient. Microsoft has reverted this change for now while continuing to explore better solutions for future versions, with a goal of reintroducing the behavior in TypeScript 5.7.
Additionally, the TypeScript 5.6 RC introduces several improvements and new features. Microsoft has renamed the BuiltinIterator
type to IteratorObject
, which now comes with a refined set of type parameters. This change includes the addition of several subtypes like ArrayIterator
and MapIterator
, making the type system more robust. A new --stopOnBuildErrors
flag has also been added for --build
mode, which halts the build process if errors are detected. This is a helpful tool for ensuring builds are only successful when the project is error-free. Furthermore, the RC brings enhanced editor support, including direct support for commit characters and new exclude patterns for auto-imports. These updates aim to further streamline the TypeScript development process, allowing developers to work more efficiently and catch bugs early.