With TypeScript 3.5, Microsoft’s TypeScript development team focused on optimizing code paths and stripping down certain functionality to make TypeScript faster. Compile times have fallen compared to TypeScript 3.4; code completion and other editor operations should be “snappier” as well, the TypeScript developers noted.
The general release of TypeScript 3.5 is due at the end of May. Other improvements in TypeScript 3.5 include:
- Caching optimizations impacting the
incrementalcompiler option that reduce the time for rebuilds.
lib.d.tsdeclaration file to provide an
Omithelper type. The compiler will use this type to express types created through object rest destructuring on generics.
- Improved excess property checks in union types. Excess property checking is intended to find typos when a type is not expecting a specific property. In TypeScript 3.5, the type checker verifies that all provided properties belong to some union member and have the appropriate type.
- When assigning to types with discriminant properties, the language will decompose types into a union of every possible inhabitant type. This provides smarter type checking.
- Referencing of UMD (Universal Module Definition) global declarations using an
- Higher-order type inferencing from generic constructors.
- TypeScript 3.5 contains some breaking changes, such as generic type parameters constrained to
You can download the TypeScript 3.5 release candidate from NuGet or by using the following NPM command:
npm install -g typescript@rc