Thursday, October 24, 2013

TypeScript 0.9 & 0.9.1– What’s Improved (

I’ve been noodling around with Typescript for a while and enjoying the various improvements over standard Javascript. Quite a bit of this comes from ES6 improvements which Typescript incorporates (and transforms to a sensible ES3 output) – for example real classes, and this-capturing lambda expressions that help avoid the number one kick-yourself error of Javascript stupidity.

Syntactic sugar aside, there are a few reasons I like Typescript. An improved IDE experience in VS (and VS2012 is already quite good with intellisense via jsdoc comments and JS execution). Static typing improves the self-documenting nature of code, helps enforce a cleaner design, and ensures program correctness. Type definition files are available (for example, the DefinitelyTyped project maintains a good selection) for popular JS libraries to allow their use with full type information in a Typescript program, and this interoperability is huge.

In this post I’m going to discuss some of the important improvements in the recent TypeScript 0.9 and 0.9.1 releases. Read more...