mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
40 lines
582 B
TypeScript
40 lines
582 B
TypeScript
module A {
|
|
export class Point {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
}
|
|
|
|
module A {
|
|
class Point {
|
|
fromCarthesian(p: A.Point) {
|
|
return { x: p.x, y: p.y };
|
|
}
|
|
}
|
|
}
|
|
|
|
// ensure merges as expected
|
|
var p: { x: number; y: number; };
|
|
var p: A.Point;
|
|
|
|
module X.Y.Z {
|
|
export class Line {
|
|
length: number;
|
|
}
|
|
}
|
|
|
|
module X {
|
|
export module Y {
|
|
export module Z {
|
|
class Line {
|
|
name: string;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ensure merges as expected
|
|
var l: { length: number; }
|
|
var l: X.Y.Z.Line;
|
|
|