2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts ===
|
|
|
|
module Root {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Root : typeof Root
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export module A {
|
2014-08-28 21:40:58 +02:00
|
|
|
>A : typeof A
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export interface Point {
|
|
|
|
>Point : Point
|
|
|
|
|
|
|
|
x: number;
|
|
|
|
>x : number
|
|
|
|
|
|
|
|
y: number;
|
|
|
|
>y : number
|
|
|
|
}
|
|
|
|
|
|
|
|
export module Utils {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Utils : typeof Utils
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export function mirror<T extends Point>(p: T) {
|
2014-08-28 21:52:44 +02:00
|
|
|
>mirror : <T extends Point>(p: T) => { x: number; y: number; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
>Point : Point
|
|
|
|
>p : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return { x: p.y, y: p.x };
|
|
|
|
>{ x: p.y, y: p.x } : { x: number; y: number; }
|
|
|
|
>x : number
|
|
|
|
>p.y : number
|
|
|
|
>p : T
|
|
|
|
>y : number
|
|
|
|
>y : number
|
|
|
|
>p.x : number
|
|
|
|
>p : T
|
|
|
|
>x : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts ===
|
|
|
|
module otherRoot {
|
2014-08-28 21:40:58 +02:00
|
|
|
>otherRoot : typeof otherRoot
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export module A {
|
2014-08-28 21:40:58 +02:00
|
|
|
>A : typeof A
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
// have to be fully qualified since in different root
|
|
|
|
export var Origin: Root.A.Point = { x: 0, y: 0 };
|
2014-08-25 19:36:12 +02:00
|
|
|
>Origin : Root.A.Point
|
2014-08-28 21:40:58 +02:00
|
|
|
>Root : unknown
|
|
|
|
>A : unknown
|
2014-08-25 19:36:12 +02:00
|
|
|
>Point : Root.A.Point
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ x: 0, y: 0 } : { x: number; y: number; }
|
|
|
|
>x : number
|
|
|
|
>y : number
|
|
|
|
|
|
|
|
export module Utils {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Utils : typeof Utils
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export class Plane {
|
|
|
|
>Plane : Plane
|
|
|
|
|
|
|
|
constructor(public tl: Root.A.Point, public br: Root.A.Point) { }
|
2014-08-25 19:36:12 +02:00
|
|
|
>tl : Root.A.Point
|
2014-08-28 21:40:58 +02:00
|
|
|
>Root : unknown
|
|
|
|
>A : unknown
|
2014-08-25 19:36:12 +02:00
|
|
|
>Point : Root.A.Point
|
|
|
|
>br : Root.A.Point
|
2014-08-28 21:40:58 +02:00
|
|
|
>Root : unknown
|
|
|
|
>A : unknown
|
2014-08-25 19:36:12 +02:00
|
|
|
>Point : Root.A.Point
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|