Another improvement bothered on the achievement that TypeScript 4.5 now can narrow values that have template string types, and also recognizes template string types as discriminants. The 4.5 also now provides snippet completions when overriding or implementing methods in classes, and for JSX attributes.
The release also has a new feature that carries out tail-recursion elimination on conditional types. The team says that TypeScript needs a way to fail gracefully when it detects possibly infinite recursion, or any type expansions that can take a long time and affect your editor experience. In handling this, TypeScript uses heuristics that identify when these problems are occurring, but some valid types trigger the ‘potential problem’ heuristics. To overcome this, TypeScript 4.5 performs some tail-recursion elimination on conditional types.
Private Field presence now checks and work out whether an object has a private field on it; and import assertions that make sure that an import has an expected format.