Thursday, October 04, 2012

TypeScript brings types to Javascript

One of the things that I generally get frustrated with when I have to code in Javascript is the lack of safety that strongly typed languages such as Delphi bring to the table. Most of the tools, while they offer basic language helpers, do not do much about the structure of your javascript application. There is no "code insight" for Javascript function least not for MY code.

One of the latest offerings from Microsoft, as presented by Anders Hejlsberg, is TypeScript. It appears to me that TypeScript is a game changer in the world of Javascript development.

TypeScript is an extension to Javascript. Everything you can do in Javascript, you can also do in TypeScript. TypeScript "compiles" to Javascript, so there is no special plugins that need to be deployed. Its all about adding the missing "type" and providing code gen helpers to make your code cleaner and easier to understand. Its all about adding that little bit more information that will make your (Javascript) applications much easier to maintain.

Looking over what TypeScript does, it makes sense. Its simple enough that it shouldn't take long to learn to apply.

If you do any Javascript development, take a look at TypeScript.