TypeScript/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js

39 lines
776 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [internalAliasFunctionInsideLocalModuleWithoutExport.ts]
export module a {
export function foo(x: number) {
return x;
}
}
export module c {
import b = a.foo;
var bVal = b(10);
export var bVal2 = b;
}
//// [internalAliasFunctionInsideLocalModuleWithoutExport.js]
var a;
2014-07-13 01:04:16 +02:00
(function (a) {
function foo(x) {
return x;
}
a.foo = foo;
})(a = exports.a || (exports.a = {}));
var c;
2014-07-13 01:04:16 +02:00
(function (c) {
var b = a.foo;
var bVal = b(10);
c.bVal2 = b;
})(c = exports.c || (exports.c = {}));
2014-07-13 01:04:16 +02:00
//// [internalAliasFunctionInsideLocalModuleWithoutExport.d.ts]
export declare module a {
2014-07-12 01:36:06 +02:00
function foo(x: number): number;
2014-07-13 01:04:16 +02:00
}
export declare module c {
import b = a.foo;
var bVal2: typeof b;
2014-07-13 01:04:16 +02:00
}