stefanpenner/ember-app-kit — pull request #274 by mixonic (2013-11-01 23:14:59+00:00)
Title: Add TypeScript support

This commit adds support for [TypeScript](http://www.typescriptlang.org/) along side other JavaScript pre-processors. Very open to review. We can upstream it, or decide nobody wants it, or decide there are too many compromises. Please discuss.

Two examples:

* App with mixed usage: https://github.com/mixonic/ember-app-kit/tree/typescript-example
* App based on an older version of this code, but 100% TypeScript: https://github.com/mixonic/ember-app-kit/tree/typescript

TypeScript's module system is less robust than you might hope for. There is no support for named modules and the core team has expressed a distaste for the idea until after 1.0. This solution relies on a Grunt package @bantic and I wrote that supports named modules. It is tested and used.

Another quirk is that TypeScript, due to how it resolves modules for typing, requires that the AMD module name be the same (ish) as the name on disk. I could address this with further customization of the compiler, but I would like to avoid that. Instead I suggest that users of this grunt path be required to name their apps `app`, or whatever the name of their app directory is.

And I will likely have another PR coming that makes that change, also open for discussion. For now, go wild with some typed JavaScript! I suggest looking at the `definitions` folder of the 100% TypeScript app to get some definition files.