I’ve been doing a lot more JavaScript recently and while I’m enjoying it I do really miss the type safety and object-oriented language features provided by ActionScript 3. This is especially true for larger projects where a proper object-oriented approach would be ideal. JavaScript’s typeless and dynamic nature means it’s incredibly easy to introduce bugs that just lurk around waiting to cause some runtime mischief whenever it takes their fancy. While it’s very easy to quickly throw things together in JavaScript, you can lose all that time bug fixing. In fact, the larger a JavaScript project gets the more terribly afraid I become of refactoring or adding features to the existing code base.

In TypeScript I think Microsoft has a really great solution to this problem. It’s a superset of JavaScript that offers static typing, classes and interfaces. All these features are available at development time and are compiled down to JavaScript for deployment. The other really neat thing about TypeScript is that it also supports ECMAScript 6, meaning that if you want to forego static typing and a few other features then you can actually start working with what’s likely to become the next official version of JavaScript.

As someone who obviously comes from a Flash background I’m finding this all quite mouthwatering. Just like Zynga’s PlayScript, TypeScript is in many ways a spiritual successor to ActionScript 3. Developing with TypeScript and working with Flash content exported using the Toolkit for CreateJS could provide a really familiar workflow for Flash developers. Plus, whereas AS3.0 is likely to be the end of the line for the ActionScript language, it looks highly likely that TypeScript will have a future.

Check out the video above where Microsoft’s Anders Hejlsberg gives an introduction to TypeScript.

  1. I’m using TypeScript every day as a developer @Wix.com, and I must say that it’s a true life saver! We have few people working on the same code base, and TypeScript helps with the safety of the code!

  2. That’s great to know Gil! Thanks for sharing.

    Christopher (Author)