TypeScript/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types

77 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts ===
module A.B {
>A : typeof A
>B : typeof B
2014-08-15 23:33:16 +02:00
export var x: number;
>x : number
2014-08-15 23:33:16 +02:00
}
module A{
>A : typeof A
2014-08-15 23:33:16 +02:00
module B {
>B : typeof B
2014-08-15 23:33:16 +02:00
export var x: string;
>x : string
2014-08-15 23:33:16 +02:00
}
}
// ensure the right var decl is exported
var x: number;
>x : number
2014-08-15 23:33:16 +02:00
var x = A.B.x;
>x : number
>A.B.x : number
>A.B : typeof A.B
>A : typeof A
>B : typeof A.B
>x : number
2014-08-15 23:33:16 +02:00
module X.Y.Z {
>X : typeof X
>Y : typeof Y
>Z : typeof Z
2014-08-15 23:33:16 +02:00
export class Line {
>Line : Line
2014-08-15 23:33:16 +02:00
length: number;
>length : number
2014-08-15 23:33:16 +02:00
}
}
module X {
>X : typeof X
2014-08-15 23:33:16 +02:00
export module Y {
>Y : typeof Y
2014-08-15 23:33:16 +02:00
module Z {
>Z : typeof Z
2014-08-15 23:33:16 +02:00
export class Line {
>Line : Line
2014-08-15 23:33:16 +02:00
name: string;
>name : string
2014-08-15 23:33:16 +02:00
}
}
}
}
// make sure merging works as expected
var l: { length: number };
>l : { length: number; }
>length : number
2014-08-15 23:33:16 +02:00
var l: X.Y.Z.Line;
>l : { length: number; }
>X : any
>Y : any
>Z : any
>Line : X.Y.Z.Line
2014-08-15 23:33:16 +02:00