2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts ===
|
|
|
|
var x: typeof undefined;
|
|
|
|
>x : any
|
|
|
|
>undefined : undefined
|
|
|
|
|
|
|
|
x = 1;
|
|
|
|
>x = 1 : number
|
|
|
|
>x : any
|
|
|
|
|
|
|
|
x = '';
|
|
|
|
>x = '' : string
|
|
|
|
>x : any
|
|
|
|
|
|
|
|
x = true;
|
|
|
|
>x = true : boolean
|
|
|
|
>x : any
|
|
|
|
|
|
|
|
var a: void;
|
|
|
|
>a : void
|
|
|
|
|
|
|
|
x = a;
|
|
|
|
>x = a : void
|
|
|
|
>x : any
|
|
|
|
>a : void
|
|
|
|
|
|
|
|
x = null;
|
|
|
|
>x = null : null
|
|
|
|
>x : any
|
|
|
|
|
|
|
|
class C { foo: string }
|
|
|
|
>C : C
|
|
|
|
>foo : string
|
|
|
|
|
|
|
|
var b: C;
|
|
|
|
>b : C
|
|
|
|
>C : C
|
|
|
|
|
|
|
|
x = C;
|
|
|
|
>x = C : typeof C
|
|
|
|
>x : any
|
|
|
|
>C : typeof C
|
|
|
|
|
|
|
|
x = b;
|
|
|
|
>x = b : C
|
|
|
|
>x : any
|
|
|
|
>b : C
|
|
|
|
|
|
|
|
interface I { foo: string }
|
|
|
|
>I : I
|
|
|
|
>foo : string
|
|
|
|
|
|
|
|
var c: I;
|
|
|
|
>c : I
|
|
|
|
>I : I
|
|
|
|
|
|
|
|
x = c;
|
|
|
|
>x = c : I
|
|
|
|
>x : any
|
|
|
|
>c : I
|
|
|
|
|
|
|
|
module M { export var x = 1; }
|
|
|
|
>M : typeof M
|
|
|
|
>x : number
|
|
|
|
|
|
|
|
x = M;
|
|
|
|
>x = M : typeof M
|
|
|
|
>x : any
|
|
|
|
>M : typeof M
|
|
|
|
|
|
|
|
x = { f() { } }
|
2014-12-03 12:05:37 +01:00
|
|
|
>x = { f() { } } : { f(): void; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>x : any
|
2014-12-03 12:05:37 +01:00
|
|
|
>{ f() { } } : { f(): void; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>f : () => void
|
|
|
|
|
|
|
|
function f<T>(a: T) {
|
|
|
|
>f : <T>(a: T) => void
|
|
|
|
>T : T
|
|
|
|
>a : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
x = a;
|
|
|
|
>x = a : T
|
|
|
|
>x : any
|
|
|
|
>a : T
|
|
|
|
}
|
|
|
|
x = f;
|
|
|
|
>x = f : <T>(a: T) => void
|
|
|
|
>x : any
|
|
|
|
>f : <T>(a: T) => void
|
|
|
|
|
|
|
|
enum E { A }
|
|
|
|
>E : E
|
|
|
|
>A : E
|
|
|
|
|
|
|
|
x = E;
|
|
|
|
>x = E : typeof E
|
|
|
|
>x : any
|
|
|
|
>E : typeof E
|
|
|
|
|
|
|
|
x = E.A;
|
|
|
|
>x = E.A : E
|
|
|
|
>x : any
|
|
|
|
>E.A : E
|
|
|
|
>E : typeof E
|
|
|
|
>A : E
|
|
|
|
|