Durandal: TypeScript modules support

I’m working on a prototype of HTML5 Single Page Application (SPA).

I’m happy to use plumbing provided by Durandal. It’s really exciting SPA framework.  Unfortunately it doesn’t support TypeScript modules.

According to Rob Eisenberg it won’t be fixed for now (quote below)

I'd rather not make a change in the core based on the current state of TypeScript. Rather, I'd prefer a plugin that re-configures durandal for this case. But, it will get fixed in TypeScript before v1.0 I confirmed that by checking their roadmap. Also Luke Hoban responded to me via codeplex to say they have every intent to fix it


So if we are going to start to use TypeScript with Durandal… we need some workaround.

So here we go.

First we need to apply below lines into router.js. It will add basic TypeScript modules support.

Second step is to enable master\detail scenario by adding below lines into system.js

Would be happy to get some feedback on this.