Saturday, October 20

EmberJS with TypeScript

Prolog

I was excited to hear about Microsoft new language TypeScript, which is a superset of JavaScript with some added functionality.

The reason I was excited is because I needed to write JavaScript library for graph calculation.
I've never write much code in JavaScript, it usually involve DOM manipulation.
This time is was both a library and a small but decent application to show both the graph and the calculated data.

EmberJS and TypeScript

After some search and play around with different JavaScript libraries I decide to use EmberJS.
EmberJS is already build with "object oriented" in mind (inheritance from SproutCore) so TypeScript look like a good fit.

Declaration File

All I need to do it create TypeScript Declaration File (d.ts) for EmberJS API which is exactly what I'm doing right now.

Currently I've just create a small prof-of-concept application.

Future

I'm going to add more into the declaration file, maybe even create some automated script to take EmberJS source code and produce the declaration file automatiically.

No comments:

Post a Comment