TypeScript/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.types
2015-04-13 14:29:37 -07:00

56 lines
2.4 KiB
Plaintext

=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts ===
declare module A {
>A : typeof A, Symbol(A, Decl(module.d.ts, 0, 0), Decl(classPoint.ts, 0, 0))
export module Point {
>Point : typeof Point, Symbol(Point, Decl(module.d.ts, 0, 18), Decl(classPoint.ts, 0, 10))
export var Origin: {
>Origin : { x: number; y: number; }, Symbol(Origin, Decl(module.d.ts, 2, 18))
x: number;
>x : number, Symbol(x, Decl(module.d.ts, 2, 28))
y: number;
>y : number, Symbol(y, Decl(module.d.ts, 3, 22))
}
}
}
=== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts ===
module A {
>A : typeof A, Symbol(A, Decl(module.d.ts, 0, 0), Decl(classPoint.ts, 0, 0))
export class Point {
>Point : Point, Symbol(Point, Decl(module.d.ts, 0, 18), Decl(classPoint.ts, 0, 10))
constructor(public x: number, public y: number) { }
>x : number, Symbol(x, Decl(classPoint.ts, 2, 20))
>y : number, Symbol(y, Decl(classPoint.ts, 2, 37))
}
}
=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts ===
var p: { x: number; y: number; }
>p : { x: number; y: number; }, Symbol(p, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(test.ts, 2, 3))
>x : number, Symbol(x, Decl(test.ts, 0, 8))
>y : number, Symbol(y, Decl(test.ts, 0, 19))
var p = A.Point.Origin;
>p : { x: number; y: number; }, Symbol(p, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(test.ts, 2, 3))
>A.Point.Origin : { x: number; y: number; }, Symbol(A.Point.Origin, Decl(module.d.ts, 2, 18))
>A.Point : typeof A.Point, Symbol(A.Point, Decl(module.d.ts, 0, 18), Decl(classPoint.ts, 0, 10))
>A : typeof A, Symbol(A, Decl(module.d.ts, 0, 0), Decl(classPoint.ts, 0, 0))
>Point : typeof A.Point, Symbol(A.Point, Decl(module.d.ts, 0, 18), Decl(classPoint.ts, 0, 10))
>Origin : { x: number; y: number; }, Symbol(A.Point.Origin, Decl(module.d.ts, 2, 18))
var p = new A.Point(0, 0); // unexpected error here, bug 840000
>p : { x: number; y: number; }, Symbol(p, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(test.ts, 2, 3))
>new A.Point(0, 0) : A.Point
>A.Point : typeof A.Point, Symbol(A.Point, Decl(module.d.ts, 0, 18), Decl(classPoint.ts, 0, 10))
>A : typeof A, Symbol(A, Decl(module.d.ts, 0, 0), Decl(classPoint.ts, 0, 0))
>Point : typeof A.Point, Symbol(A.Point, Decl(module.d.ts, 0, 18), Decl(classPoint.ts, 0, 10))
>0 : number
>0 : number