Introduction to TypeScript 2.2: What’s New?

This week Microsoft team introduced the latest update for TypeScript, version 2.2, packed with recent features, useful fixes and enhanced experience in the long run. This release supports Visual Studio 2015, while Visual Studio 2017 support will be added in the next version.

What’s been fixed?

  • Missing imports and properties added
  • Forgotten this. to variables added
  • Unused declarations removed
  • Abstract members implemented

TypeScript 2.2 release

What is new in Microsoft TypeScript 2.2?

  • Support for ECMAScript 2015 mix-in class pattern with rules for blending regular construct signatures with mix-in construct signatures in intersection types;
  • The new object type to match any types, except for primitive ones, like string, boolean, symbol, number, null, undefined;
  • The new.target support (ES2015 new syntax);
  • Improved checking for undefined / null in operands of expressions;
  • Dotted property for types with string index signature allowed at TypeScript version 2.2;
  • Added support for spread operator on JSX element children;
  • New react-native mode that keeps the JSX syntax in the output file, but gives it a .js extension, as React Native loader requires;
  • Enhanced string indexing behavior to make testing JSON object properties more ergonomic;

And what’s next?

Currently, MS team is already working on the TypeScript 2.3 that is planned for release in May 2017. For now, it is made up of:

  • Generic defaults
  • Asynchronous iterators support
  • Generator support for ES5 / ES3
  • JSX stateless components overload resolution

However, it is still a brief preview. You can check out MS TypeScript 2.2 by installing it from npm:

npm install -g typescript

 

↑ Go up

Similar post