TypeScript FTW

There are many supersets of JavaScript that we get to hear of on a regular basis. There is this extensive list on github that briefly describes each and every superset available. I admit to have tried only one of them which is TypeScript. Although I am not a huge fan of it just yet, I see the benefits of using it in a big project.

TypeScript differs from many other supersets by having types, be it primitives or generics. Also it is more close to JavaScript. It has most of the features that’s available in ES2015 as well as ES2016, which has not been finalised yet. This was one of the reasons (anoother reason being support for annotations) why the Angular team chose it as the main language for the second version of the framework.

Angular 2 is tightly knit with TypeScript, though it does support plain old JavaScript as well as Dart. So because of this, we need to set up some extra tooling to use Angular 2.

The main tool that we need is the TypeScript compiler to transpile TypeScript into JavaScript. Browsers don’t yet support TypeScript natively and also it is doubtful that they ever will. So to get our code to run, we need to either transpile our code or use the TypeScript runtime. The latter is a script that has to be loaded before loading our TypeScript code so that it can transpile on the fly.

In my next blog post I’ll try to explain briefly on how to setup the tooling necessary to use TypeScript along with Angular 2.


This is going to be my first post of this brand new blog site. I used to have a static website before for quite a while. But now I have a blog that has become my website. So hang on tight. I have plans to write about tech stuff that I am familiar with.