TypeScript/tests/baselines/reference/usingModuleWithExportImportInValuePosition.types

64 lines
1 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/usingModuleWithExportImportInValuePosition.ts ===
module A {
2014-08-28 21:40:58 +02:00
>A : typeof A
2014-08-15 23:33:16 +02:00
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 {
2014-08-28 21:40:58 +02:00
>B : unknown
2014-08-15 23:33:16 +02:00
export interface Id {
>Id : Id
name: string;
>name : string
}
}
}
module C {
2014-08-28 21:40:58 +02:00
>C : typeof C
2014-08-15 23:33:16 +02:00
export import a = A;
2014-08-28 21:40:58 +02:00
>a : typeof a
2014-08-25 19:36:12 +02:00
>A : typeof a
2014-08-15 23:33:16 +02:00
}
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
2014-08-25 19:36:12 +02:00
>new C.a.Point(0, 0) : A.Point
>C.a.Point : typeof A.Point
2014-08-15 23:33:16 +02:00
>C.a : typeof A
>C : typeof C
>a : typeof A
2014-08-25 19:36:12 +02:00
>Point : typeof A.Point
2014-08-15 23:33:16 +02:00
var c: { name: string };
>c : { name: string; }
>name : string
var c: C.a.B.Id;
>c : { name: string; }
2014-08-28 21:40:58 +02:00
>C : unknown
>a : unknown
>B : unknown
2014-08-25 19:36:12 +02:00
>Id : A.B.Id
2014-08-15 23:33:16 +02:00