2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts ===
|
|
|
|
module A {
|
2014-08-28 21:40:58 +02:00
|
|
|
>A : typeof A
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export class Point {
|
|
|
|
>Point : Point
|
|
|
|
|
|
|
|
x: number;
|
|
|
|
>x : number
|
|
|
|
|
|
|
|
y: number;
|
|
|
|
>y : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module A {
|
2014-08-28 21:40:58 +02:00
|
|
|
>A : typeof A
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
class Point {
|
|
|
|
>Point : Point
|
|
|
|
|
|
|
|
fromCarthesian(p: A.Point) {
|
2014-08-25 19:36:12 +02:00
|
|
|
>fromCarthesian : (p: A.Point) => { x: number; y: number; }
|
|
|
|
>p : A.Point
|
2014-08-28 21:40:58 +02:00
|
|
|
>A : unknown
|
2014-08-25 19:36:12 +02:00
|
|
|
>Point : A.Point
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return { x: p.x, y: p.y };
|
|
|
|
>{ x: p.x, y: p.y } : { x: number; y: number; }
|
|
|
|
>x : number
|
|
|
|
>p.x : number
|
2014-08-25 19:36:12 +02:00
|
|
|
>p : A.Point
|
2014-08-15 23:33:16 +02:00
|
|
|
>x : number
|
|
|
|
>y : number
|
|
|
|
>p.y : number
|
2014-08-25 19:36:12 +02:00
|
|
|
>p : A.Point
|
2014-08-15 23:33:16 +02:00
|
|
|
>y : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ensure merges as expected
|
|
|
|
var p: { x: number; y: number; };
|
|
|
|
>p : { x: number; y: number; }
|
|
|
|
>x : number
|
|
|
|
>y : number
|
|
|
|
|
|
|
|
var p: A.Point;
|
|
|
|
>p : { x: number; y: number; }
|
2014-08-28 21:40:58 +02:00
|
|
|
>A : unknown
|
2014-08-25 19:36:12 +02:00
|
|
|
>Point : A.Point
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
module X.Y.Z {
|
2014-08-28 21:40:58 +02:00
|
|
|
>X : typeof X
|
|
|
|
>Y : typeof Y
|
|
|
|
>Z : typeof Z
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export class Line {
|
|
|
|
>Line : Line
|
|
|
|
|
|
|
|
length: number;
|
|
|
|
>length : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module X {
|
2014-08-28 21:40:58 +02:00
|
|
|
>X : typeof X
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export module Y {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Y : typeof Y
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export module Z {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Z : typeof Z
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
class Line {
|
|
|
|
>Line : Line
|
|
|
|
|
|
|
|
name: string;
|
|
|
|
>name : string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ensure merges as expected
|
|
|
|
var l: { length: number; }
|
|
|
|
>l : { length: number; }
|
|
|
|
>length : number
|
|
|
|
|
|
|
|
var l: X.Y.Z.Line;
|
|
|
|
>l : { length: number; }
|
2014-08-28 21:40:58 +02:00
|
|
|
>X : unknown
|
|
|
|
>Y : unknown
|
|
|
|
>Z : unknown
|
2014-08-25 19:36:12 +02:00
|
|
|
>Line : X.Y.Z.Line
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
|