19 lines
400 B
TypeScript
19 lines
400 B
TypeScript
|
module A {
|
||
|
export var x = 'hello world'
|
||
|
export class Point {
|
||
|
constructor(public x: number, public y: number) { }
|
||
|
}
|
||
|
export module B {
|
||
|
export interface Id {
|
||
|
name: string;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
module C {
|
||
|
export import a = A;
|
||
|
}
|
||
|
|
||
|
var a: string = C.a.x;
|
||
|
var b: { x: number; y: number; } = new C.a.Point(0, 0);
|
||
|
var c: { name: string };
|
||
|
var c: C.a.B.Id;
|