2014-07-13 01:04:16 +02:00
|
|
|
//// [multiModuleClodule1.ts]
|
|
|
|
class C {
|
|
|
|
constructor(x: number) { }
|
|
|
|
foo() { }
|
|
|
|
bar() { }
|
|
|
|
static boo() { }
|
|
|
|
}
|
|
|
|
|
|
|
|
module C {
|
|
|
|
export var x = 1;
|
|
|
|
var y = 2;
|
|
|
|
}
|
|
|
|
module C {
|
|
|
|
export function foo() { }
|
|
|
|
function baz() { return ''; }
|
|
|
|
}
|
|
|
|
|
|
|
|
var c = new C(C.x);
|
|
|
|
c.foo = C.foo;
|
|
|
|
|
|
|
|
//// [multiModuleClodule1.js]
|
|
|
|
var C = (function () {
|
|
|
|
function C(x) {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
C.prototype.foo = function () { };
|
|
|
|
C.prototype.bar = function () { };
|
|
|
|
C.boo = function () { };
|
2014-07-13 01:04:16 +02:00
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
var C;
|
|
|
|
(function (C) {
|
|
|
|
C.x = 1;
|
|
|
|
var y = 2;
|
|
|
|
})(C || (C = {}));
|
|
|
|
var C;
|
|
|
|
(function (C) {
|
2015-02-07 03:45:09 +01:00
|
|
|
function foo() { }
|
2014-07-13 01:04:16 +02:00
|
|
|
C.foo = foo;
|
2015-02-07 05:03:24 +01:00
|
|
|
function baz() { return ''; }
|
2014-07-13 01:04:16 +02:00
|
|
|
})(C || (C = {}));
|
|
|
|
var c = new C(C.x);
|
|
|
|
c.foo = C.foo;
|