What’s new in TypeScript 2.7

Microsoft has moved TypeScript 2.7 to a release candidate stage, with general availability of the new version expected in a few weeks. TypeScript 2.7 brings three noteworthy improvements: definite assignment checks for class properties, fixed length tuples, and improved narrowing for the in and instanceof operators. 

With fixed length tuples, Microsoft notes, “tuple types now encode their arity [i.e. the number of elements they include] into the the type of their respective length property, and tuples of different types are no longer assignable to each other.” This is a breaking change.

TypeScript 2.7 also is slated to add refactoring of the CommonJS module to ECMAScript 6, with this being the version of the standard JavaScript specification approved by ECMA International in 2015.

To read this article in full, please click here

Read more 0 Comments