Switching to TypeScript
Until a few weeks ago, I was a convinced user of coffeescript: significant whitespace, no curly braces, list comprehensions, classes, thick arrow, chained comparisons, etc. The list of good things coffeescript brings to the table is quite long, just have a look the coffeescript website.
Then, Microsoft announed Typescript 1.0 and that made me give a second look to it.
My initial reaction the first time I heard about it was something along the line of: eh, they are probably going to stop working on it in a year or so, like lots of their projects. Turns out I was wrong ! I am not going to detail Typescript too much as there is a complete handbook available.
Why would I use Typescript ?🔗
I can see several reasons.
The third would be all the other features that Typescript brings: modules, classes, arrow functions, etc. Their goal is to have an interface similar to what we will have in ES6 but, as ES6 is still changing a lot (for example the module implementation), it can differ quite a bit right now. I am confident they will adapt to whatever standard has been adopted, unless they decide to somehow abandon their goal of sticking to ES6.
How am I using it🔗
I finished switching my ng-boilerplate to Typescript and it works pretty well. Since I use AngularJS with REST APIs, I can define the types I will receive in the API, methods on controllers/scopes and have some robust code that ensure I didn't call a made-up function or made a typo in an object attribute immediately. The interfaces you define can also serve as a very good documentation and helps if you're dealing with a huge codebase (which is the goal of Typescript). I made a simple invoice app (github link) when I was trying it out and it caught many errors before I even opened the page.