TypeScript 2 has been released

TypeScript 2 has been released (to be exact: version 2.0.3).

 

As by TypeScript 2.0 is now available!, the principal innovations are:

  • Definition file acquisition via npm
    This change is in line with the new Microsoft guideline to use npm (or bower) to acquire client side libraries (and still use NuGet for server side packages); it is also coherent of letting users leverage the TypeScript language even on non-Windows computers, in particular on Mac and Linux, where you can use Visual Studio Code
  • Non nullable types
    It's confirmed that this is a breaking change, so you have to set strictNullChecks to true in your tsconfig.json (by default it is false). Clearly it's strongly suggested to do so
  • Control Flow Analyzed Types
    Even more expanded from what already available in TypeScript 1.8
  • Readonly modified
    Similar to what available in C#

An even more detailed list of the language innovations is in What's new in TypeScript. And also give at look at the Breaking Changes.

 

Finally: you can start using it in Visual Studio 2015 downloading the TypeScript for Visual Studio 2015 plugin (it requires the Update 3).

Add comment

Loading