TypeScript 4.0 RC Is Now Available

TypeScript 4.0 RC brings Variadic Tuple Types, Labeled Tuple Elements, Class Property Inference from Constructors, Editor Improvements, and Speed Improvements in build mode.

Microsoft announced the release candidate of TypeScript 4.0.
 
4.0 RC brings a few new features and improvements to TypeScript like Variadic Tuple Types, Labeled Tuple Elements, Class Property Inference from Constructors, Editor Improvements and Speed Improvements in build mode.
 
You can now represent higher-order operations on tuples and arrays even when if you don’t know the actual types you are operating over. When generic spreads are instantiated in these tuple types, they can produce other sets of array and tuple types. Another change is that spread elements can now occur anywhere in a tuple, not just at the end.
 
 
 
In TypeScript 4.0, tuples types can now provide labels as well. Labeled tuples can be handy when taking advantage of patterns around tuples and argument lists, along with implementing overloads in a type-safe way.
 
TypeScript 4.0 RC enables you to use control flow analysis to determine the types of properties in classes when noImplicitAny is enabled. When not all paths of a constructor assign to an instance member, the property will be considered to potentially be undefined. And if you know better (for example you have an initialize method of some sort), you’ll require an explicit type annotation along with a definite assignment assertion (!) if you’re in strictPropertyInitialization.
 
The release is also bringing a new refactoring to convert common patterns in order to take advantage of optional chaining and nullish coalescing.
 
For more details, you can visit the official announcement here.


Next Recommended Reading Beta Of TypeScript 4.0 Is Out