TypeScript == Add typing to Javascript

One of the problems I had in the past with building JavaScript solutions was the lack of support for modules. Of course you could solve this by adding RequireJS or CommonJS javascript libraries.

The biggest question I had was 'how to build code' ?

Then Microsoft came up with TypeScript announced by C# hero Anders Hejlsberg.
At first I was quite sceptical because I thought this was just going to be another CoffeeScript or even Google Dart.

After playing around with it I think it's rather nice. Basically TypeScript is just a superset of javascript (and not some cross compiler) adding Ecmascript 6 language elements to the current Ecmascript 5/Javascript standard.
So in short; you can start using interfaces, classes and static typing in javascript projects already and the TypeScript compiler will take care of converting it in Javascript you can use in current browsers and node.js. On top of that it will also handle modules, it's completely open source and there is a brilliant Visual Studio 2012 plugin.

One downside: it's in pre-alpha / preview state so no guarantees on how long it will be supported or actively developed. But I think you should at least have a look at it to see for yourself if you would use it in your project.

I know I will.

More links on typescript:

http://typescriptlang.org

http://www.nczonline.net/blog/2012/10/04/thoughts-on-typescript/ http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript https://github.com/borisyankov/DefinitelyTyped

Ronald Harmsen

I'm a software developer. When I'm not developing software I'm training & coaching other developers, speaking on a conference or fiddling with some technical stuff.

Arnhem, The Netherlands

Subscribe to Ronald to the cloud

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!