64 lines
1 KiB
Plaintext
64 lines
1 KiB
Plaintext
=== tests/cases/compiler/usingModuleWithExportImportInValuePosition.ts ===
|
|
module A {
|
|
>A : typeof A
|
|
|
|
export var x = 'hello world'
|
|
>x : string
|
|
|
|
export class Point {
|
|
>Point : Point
|
|
|
|
constructor(public x: number, public y: number) { }
|
|
>x : number
|
|
>y : number
|
|
}
|
|
export module B {
|
|
>B : unknown
|
|
|
|
export interface Id {
|
|
>Id : Id
|
|
|
|
name: string;
|
|
>name : string
|
|
}
|
|
}
|
|
}
|
|
module C {
|
|
>C : typeof C
|
|
|
|
export import a = A;
|
|
>a : typeof a
|
|
>A : typeof a
|
|
}
|
|
|
|
var a: string = C.a.x;
|
|
>a : string
|
|
>C.a.x : string
|
|
>C.a : typeof A
|
|
>C : typeof C
|
|
>a : typeof A
|
|
>x : string
|
|
|
|
var b: { x: number; y: number; } = new C.a.Point(0, 0);
|
|
>b : { x: number; y: number; }
|
|
>x : number
|
|
>y : number
|
|
>new C.a.Point(0, 0) : A.Point
|
|
>C.a.Point : typeof A.Point
|
|
>C.a : typeof A
|
|
>C : typeof C
|
|
>a : typeof A
|
|
>Point : typeof A.Point
|
|
|
|
var c: { name: string };
|
|
>c : { name: string; }
|
|
>name : string
|
|
|
|
var c: C.a.B.Id;
|
|
>c : { name: string; }
|
|
>C : unknown
|
|
>a : unknown
|
|
>B : unknown
|
|
>Id : A.B.Id
|
|
|