The final release of Typescript 2.0 is here. Typescript 2.0 is the typed superset of Javascript which is expected to go beyond what Javascript has achieved throughout the years.
One of the most important features of Typescript 2.0 release is said to be tagged unions. Program manager for Typescript, Daniel Rosenwasser stated: "Tagged unions make it way easier to get type safety using JavaScript patterns you’d write today." Other important features include non-nullable types, glob support in tsconfig and control flow analyzed types. The release also includes support for Javascript libraries and tools, alignment with ECMAScript among many other features.
In order to resolve many of the high-impact bugs, Typescript 2.0 will be requiring Microsoft Visual Studio 2015 Update 3. It is known that company is trying to improve its language service and provide smarter tools.
Also read: Release Of WebStorm 2016.2- JetBrains
In Javascript users usually, forget that null or undefined will be returned from API’s. This is often referred to as a billion dollar mistake. In Typescript 2.0 both null and undefined will be having their own types which will allow developers to explicitly express when they are used.
Control flow analysis is not a new concept to Typescript as it is existing since 1.8. But in the new release, it has been enhanced to produce the most specific type possible. With the help of non-nullable, it is now possible for Typescript 2.0 to perform much more complex checks.
The reactions for the new release has been positive so far. It is said that this is the massive leap forward for the Typescript and that moving back to the old and plain ECMAScript will pretty much be impossible now.
Developers will be able to use the latest release by downloading the Typescript 2.0 for Microsoft Visual Studio 2015.
Leave a Reply
Your email address will not be published. Required fields are marked *