TypeScript/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js

40 lines
864 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [internalAliasClassInsideTopLevelModuleWithExport.ts]
export module x {
export class c {
foo(a: number) {
return a;
}
}
}
export import xc = x.c;
export var cProp = new xc();
var cReturnVal = cProp.foo(10);
//// [internalAliasClassInsideTopLevelModuleWithExport.js]
var x;
2014-07-13 01:04:16 +02:00
(function (x) {
var c = (function () {
function c() {
}
c.prototype.foo = function (a) {
return a;
};
return c;
})();
x.c = c;
})(x = exports.x || (exports.x = {}));
2014-07-13 01:04:16 +02:00
exports.xc = x.c;
exports.cProp = new exports.xc();
var cReturnVal = exports.cProp.foo(10);
//// [internalAliasClassInsideTopLevelModuleWithExport.d.ts]
export declare module x {
class c {
2014-07-12 01:36:06 +02:00
foo(a: number): number;
2014-07-13 01:04:16 +02:00
}
}
export import xc = x.c;
export declare var cProp: xc;