What is Typescript?
A brief history
The first version of Typescript (Typescript 0.8) was released to public in 2012.
In 2013 another version of Typescript was released (Typescript 0.9) and many new features were added including support for generics. Also Microsoft added builtin support for Typescript in Visual Studio 2013.
One year later in 2014 at Microsoft Build Developers Conference, Typescript 1.0 was released. Later same year a new Typescript compiler was also introduced.
In 2016 Typescript 2.0 was released, adding many more new features to the language.
Typescript 2.1 was released in year 2017, and since then another 5 versions of Typescript are released. The current versions of Typescript is 2.6.
Why should one use it ?
Using new features of ECMAScript:
TypeScript makes typing a bit easier and a lot less explicit by the usage of type inference. For example:
var x = "hello" in TypeScript is the same as
var x : string = "hello". The type is simply inferred from its use. Even it you don’t explicitly type the types, they are still there to save you from doing something which otherwise would result in a run-time error.
Better IDE support
Strict Null Checking
undefined. By using
--strictNullChecks flag in TypeScript compiler you can eliminate these kinds of errors all together.
These are just a few of the many advantages of using Typescript. You can discover many more by going through the following resources.