TypeScript 4.6 was released with improvements including the ability to have code before super() in constructors and control flow analysis for unstructured discriminated unions.
Another enhancement is the addition of control flow analysis for unstructured discriminated unions. TypeScript can use discriminator properties to refine type analysis. If an individual property is destructured into a const declaration, TypeScript checks whether the destructured type is a discriminated union. If so, TypeScript can now restrict variable types based on checks of other variables
Other enhancements include improved recursion depth checks and improvements to indexed access types, which means TypeScript can now correctly infer indexed access types that immediately index into a mapped object type.
There is also a new tool called TypeScript Trace Analyzer. This gives a better view of the analysis showing when a type might be computationally expensive to create and compare with other types.
TypeScript 4.6 is available now.
TypeScript on NuGet
TypeScript on GitHub
TypeScript 4.5 adds expected
TypeScript 4.4 improves control flow parsing
TypeScript 4.3 adds separate property write types
TypeScript 4.2 release candidate available
New TypeScript Website Launched
TypeScript 4.1 adds temporal literal types
TypeScript 3.0 adds project references
TypeScript adds unused scope reports
TypeScript adds conditional types
To be notified of new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
or send your comment to: email@example.com