Typescript 2 Released

 

If you have not updated to visual studio 2015 update 3, you might want to do it now. Then install version 2.0.3 of typescript from https://www.microsoft.com/en-us/download/details.aspx?id=48593

If you prefer to wait, the new version of typescript should be included in the next release of Visual Studio, as it is currently included with the preview version of the next release.

 

Here is the impressive list of the new features, described in details here.

  • Null- and undefined-aware types
  • Assigned-before-use checking
  • Optional parameters and properties
  • Non-null and non-undefined type guards
  • Dotted names in type guards
  • Expression operators
  • Type widening
  • Non-null assertion operator | Aka null propagation
  • Control flow based type analysis
  • Tagged union types
  • The never type
  • Read-only properties and index signatures
  • Specifying the type of this for functions
  • this parameters in callbacks
  • Glob support in tsconfig.json
  • Module resolution enhancements: BaseUrl, Path mapping, rootDirs and tracing
  • Path mapping
  • Virtual Directories with rootDirs
  • Shorthand ambient module declarations
  • Support for UMD module definitions
  • Optional class properties
  • Private and Protected Constructors
  • Abstract properties and accessors
  • Implicit index signatures
  • Including built-in type declarations with –lib
  • Flag unused declarations with –noUnusedParameters and –noUnusedLocals
  • Module identifiers allow for .js extension
  • Support ‘target : es5’ with ‘module: es6’
  • Trailing commas in function parameter and argument lists

Submit a Comment

Your email address will not be published. Required fields are marked *

Share This