I have 2 typescript files that share the same external module:
A.ts:
export module mymodule {
export class MyClass {
}
}
B.ts:
import a = require("A");
export module mymodule {
export class MyOtherClass {
new a.mymodule.MyClass()
}
}
This all works nice and tidy in development and I enjoy type safety, dev support, debugging, etc. but for production, I would rather want to have it all in one JavaScript file.
Is that possible at all? I tried with --out and r.js but the combined files invariably end in nested define statements that make access to any class impossible.
If you are curious what we are trying to build: https://github.com/canoo/open-dolphin/tree/master/subprojects/client-javascript/js/dolphin