TypeScript/tests/baselines/reference/importInTypePosition.types

54 lines
926 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/importInTypePosition.ts ===
module A {
>A : typeof A
2014-08-15 23:33:16 +02:00
export class Point {
>Point : Point
2014-08-15 23:33:16 +02:00
constructor(public x: number, public y: number) { }
>x : number
>y : number
2014-08-15 23:33:16 +02:00
}
export var Origin = new Point(0, 0);
>Origin : Point
2014-08-15 23:33:16 +02:00
>new Point(0, 0) : Point
>Point : typeof Point
2015-04-13 21:36:11 +02:00
>0 : number
>0 : number
2014-08-15 23:33:16 +02:00
}
// no code gen expected
module B {
>B : any
2014-08-15 23:33:16 +02:00
import a = A; //Error generates 'var <Alias> = <EntityName>;'
>a : typeof a
>A : typeof a
2014-08-15 23:33:16 +02:00
}
// no code gen expected
module C {
>C : typeof C
2014-08-15 23:33:16 +02:00
import a = A; //Error generates 'var <Alias> = <EntityName>;'
>a : typeof a
>A : typeof a
2014-08-15 23:33:16 +02:00
var m: typeof a;
>m : typeof a
>a : typeof a
2014-08-15 23:33:16 +02:00
var p: a.Point;
>p : a.Point
>a : any
>Point : a.Point
2014-08-15 23:33:16 +02:00
var p = { x: 0, y: 0 };
>p : a.Point
2014-08-15 23:33:16 +02:00
>{ x: 0, y: 0 } : { x: number; y: number; }
>x : number
2015-04-13 21:36:11 +02:00
>0 : number
>y : number
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
}