Ember and TypeScript

Glad to see that this age-old thread still is so alive and active! I’m really hoping that something that @rtm envisions eventually materializes. In the best of worlds, we wouldn’t even have to fork the TypeScript compiler but it would be made extensible in terms of what you can do with the output for it.

However, I am also interested in terms of “what can we do right now” with the current (2.1) version of TypeScript and Ember.

This SO thread gave me some ideas; I tried it on a simple hello-world project of mine, but the problem is that I am not exporting a proper Javascript class… i.e. not something based on Ember.Controller.extend. If I in the debugger new this class, I get a seemingly proper instance, i.e. something that has a few __ember properties in it. But, the app doesn’t seem to be able to use this class.

I guess I could perhaps manually Ember.Controller.extend(myClass), but is there a nicer way to get Ember to be able to use this class? Do we already have some form of best-practices on working with Typescript right now apart from this thread?