2014-07-13 01:04:16 +02:00
|
|
|
//// [tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts] ////
|
|
|
|
|
|
|
|
//// [function.ts]
|
|
|
|
module A {
|
|
|
|
export function Point() {
|
|
|
|
return { x: 0, y: 0 };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [module.ts]
|
|
|
|
module B {
|
|
|
|
export module Point {
|
|
|
|
export var Origin = { x: 0, y: 0 };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [test.ts]
|
|
|
|
var fn: () => { x: number; y: number };
|
|
|
|
var fn = A.Point;
|
|
|
|
|
|
|
|
var cl: { x: number; y: number; }
|
|
|
|
var cl = B.Point.Origin;
|
|
|
|
|
|
|
|
|
|
|
|
//// [function.js]
|
|
|
|
var A;
|
|
|
|
(function (A) {
|
|
|
|
function Point() {
|
|
|
|
return { x: 0, y: 0 };
|
|
|
|
}
|
|
|
|
A.Point = Point;
|
|
|
|
})(A || (A = {}));
|
|
|
|
//// [module.js]
|
|
|
|
var B;
|
|
|
|
(function (B) {
|
2014-09-07 02:40:19 +02:00
|
|
|
var Point;
|
2014-07-13 01:04:16 +02:00
|
|
|
(function (Point) {
|
|
|
|
Point.Origin = { x: 0, y: 0 };
|
2014-09-07 02:40:19 +02:00
|
|
|
})(Point = B.Point || (B.Point = {}));
|
2014-07-13 01:04:16 +02:00
|
|
|
})(B || (B = {}));
|
|
|
|
//// [test.js]
|
|
|
|
var fn;
|
|
|
|
var fn = A.Point;
|
|
|
|
var cl;
|
|
|
|
var cl = B.Point.Origin;
|