TypeScript 5.6 has been released with enhanced error checking and many other improvements
Microsoft has announced the release of TypeScript 5.6, bringing a host of new features and improvements. In this version, the compiler now flags errors when it can syntactically determine that a truthy or nullish check will always evaluate in a specific way. A new type called IteratorObject has been introduced, along with an intrinsic type named BuiltinIteratorReturn and a --strict-mode flag called --strictBuiltinIteratorReturn. When using IteratorObjects in places like lib.d.ts, they are written with the BuiltinIteratorReturn type for TReturn.
TypeScript 5.6 also allows the use of arbitrary module identifiers in code and introduces a new compiler option, --noUncheckedSideEffectImports, to catch specific cases where a source file for a side-effect import cannot be found. Additionally, a new --noCheck compiler option allows skipping type checking for all input files.
In --build mode, projects will continue to build even with intermediate errors in dependencies, reporting errors consistently and generating output files on a best-effort basis. The new region-prioritized diagnostics feature enhances error reporting by focusing on specific code regions.
The update also lists safe characters for commit in completion items and adds new editor functionalities, including direct support for commit characters and exclude patterns for auto-imports.