47 lines
1.7 KiB
Text
47 lines
1.7 KiB
Text
=== tests/cases/compiler/importInTypePosition.ts ===
|
|
module A {
|
|
>A : Symbol(A, Decl(importInTypePosition.ts, 0, 0))
|
|
|
|
export class Point {
|
|
>Point : Symbol(Point, Decl(importInTypePosition.ts, 0, 10))
|
|
|
|
constructor(public x: number, public y: number) { }
|
|
>x : Symbol(x, Decl(importInTypePosition.ts, 2, 20))
|
|
>y : Symbol(y, Decl(importInTypePosition.ts, 2, 37))
|
|
}
|
|
export var Origin = new Point(0, 0);
|
|
>Origin : Symbol(Origin, Decl(importInTypePosition.ts, 4, 14))
|
|
>Point : Symbol(Point, Decl(importInTypePosition.ts, 0, 10))
|
|
}
|
|
|
|
// no code gen expected
|
|
module B {
|
|
>B : Symbol(B, Decl(importInTypePosition.ts, 5, 1))
|
|
|
|
import a = A; //Error generates 'var <Alias> = <EntityName>;'
|
|
>a : Symbol(a, Decl(importInTypePosition.ts, 8, 10))
|
|
>A : Symbol(a, Decl(importInTypePosition.ts, 0, 0))
|
|
}
|
|
// no code gen expected
|
|
module C {
|
|
>C : Symbol(C, Decl(importInTypePosition.ts, 11, 1))
|
|
|
|
import a = A; //Error generates 'var <Alias> = <EntityName>;'
|
|
>a : Symbol(a, Decl(importInTypePosition.ts, 13, 10))
|
|
>A : Symbol(a, Decl(importInTypePosition.ts, 0, 0))
|
|
|
|
var m: typeof a;
|
|
>m : Symbol(m, Decl(importInTypePosition.ts, 16, 7))
|
|
>a : Symbol(a, Decl(importInTypePosition.ts, 13, 10))
|
|
|
|
var p: a.Point;
|
|
>p : Symbol(p, Decl(importInTypePosition.ts, 17, 7), Decl(importInTypePosition.ts, 18, 7))
|
|
>a : Symbol(a, Decl(importInTypePosition.ts, 13, 10))
|
|
>Point : Symbol(a.Point, Decl(importInTypePosition.ts, 0, 10))
|
|
|
|
var p = { x: 0, y: 0 };
|
|
>p : Symbol(p, Decl(importInTypePosition.ts, 17, 7), Decl(importInTypePosition.ts, 18, 7))
|
|
>x : Symbol(x, Decl(importInTypePosition.ts, 18, 13))
|
|
>y : Symbol(y, Decl(importInTypePosition.ts, 18, 19))
|
|
}
|
|
|