You need to "export" your modules;
export module depModule { export class A { } }
which will be translated into JavaScript code that looks like this:
define(["require", "exports"], function(require, exports) { (function (depModule) { var A = (function () { function A() { } return A; })(); depModule.A = A; })(exports.depModule || (exports.depModule = {})); })
and then you use them with "import":
module otherModule { import depModule = module('depModule'); var a = new depModule.depModule.A(); }
you will need to specify the type of code generation of your module in the compiler using --module AMD.
mohamed hegazy
source share