TypeScript/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types

127 lines
2.6 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts ===
module A {
>A : typeof A
2014-08-15 23:33:16 +02:00
export interface Point {
>Point : Point
2014-08-15 23:33:16 +02:00
x: number;
>x : number
2014-08-15 23:33:16 +02:00
y: number;
>y : number
2014-08-15 23:33:16 +02:00
}
export module Utils {
>Utils : typeof Utils
2014-08-15 23:33:16 +02:00
export function mirror<T extends Point>(p: T) {
>mirror : <T extends Point>(p: T) => { x: number; y: number; }
>T : T
>Point : Point
>p : T
>T : T
2014-08-15 23:33:16 +02:00
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
2014-08-15 23:33:16 +02:00
}
}
}
=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts ===
module A {
>A : typeof A
2014-08-15 23:33:16 +02:00
export var Origin: Point = { x: 0, y: 0 };
>Origin : Point
>Point : Point
2014-08-15 23:33:16 +02:00
>{ x: 0, y: 0 } : { x: number; y: number; }
>x : number
2015-04-13 21:36:11 +02:00
>0 : number
>y : number
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
export module Utils {
>Utils : typeof Utils
2014-08-15 23:33:16 +02:00
export class Plane {
>Plane : Plane
2014-08-15 23:33:16 +02:00
constructor(public tl: Point, public br: Point) { }
>tl : Point
>Point : Point
>br : Point
>Point : Point
2014-08-15 23:33:16 +02:00
}
}
}
=== tests/cases/conformance/internalModules/DeclarationMerging/part3.ts ===
// test the merging actually worked
var o: { x: number; y: number };
>o : { x: number; y: number; }
>x : number
>y : number
2014-08-15 23:33:16 +02:00
var o: A.Point;
>o : { x: number; y: number; }
>A : any
>Point : A.Point
2014-08-15 23:33:16 +02:00
var o = A.Origin;
>o : { x: number; y: number; }
>A.Origin : A.Point
>A : typeof A
>Origin : A.Point
2014-08-15 23:33:16 +02:00
var o = A.Utils.mirror(o);
>o : { x: number; y: number; }
2014-08-15 23:33:16 +02:00
>A.Utils.mirror(o) : { x: number; y: number; }
>A.Utils.mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
>A.Utils : typeof A.Utils
>A : typeof A
>Utils : typeof A.Utils
>mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
>o : { x: number; y: number; }
2014-08-15 23:33:16 +02:00
var p: { tl: A.Point; br: A.Point };
>p : { tl: A.Point; br: A.Point; }
>tl : A.Point
>A : any
>Point : A.Point
>br : A.Point
>A : any
>Point : A.Point
2014-08-15 23:33:16 +02:00
var p: A.Utils.Plane;
>p : { tl: A.Point; br: A.Point; }
>A : any
>Utils : any
>Plane : A.Utils.Plane
2014-08-15 23:33:16 +02:00
var p = new A.Utils.Plane(o, { x: 1, y: 1 });
>p : { tl: A.Point; br: A.Point; }
2014-08-25 19:36:12 +02:00
>new A.Utils.Plane(o, { x: 1, y: 1 }) : A.Utils.Plane
>A.Utils.Plane : typeof A.Utils.Plane
>A.Utils : typeof A.Utils
>A : typeof A
>Utils : typeof A.Utils
>Plane : typeof A.Utils.Plane
>o : { x: number; y: number; }
2014-08-15 23:33:16 +02:00
>{ x: 1, y: 1 } : { x: number; y: number; }
>x : number
2015-04-13 21:36:11 +02:00
>1 : number
>y : number
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00