71 lines
1 KiB
Plaintext
71 lines
1 KiB
Plaintext
=== tests/cases/compiler/unknownSymbols2.ts ===
|
|
module M {
|
|
>M : typeof M
|
|
|
|
var x: asdf;
|
|
>x : any
|
|
>asdf : No type information available!
|
|
|
|
var y = x + asdf;
|
|
>y : any
|
|
>x + asdf : any
|
|
>x : any
|
|
>asdf : any
|
|
|
|
var z = <asdf>x; // should be an error
|
|
>z : any
|
|
><asdf>x : any
|
|
>asdf : No type information available!
|
|
>x : any
|
|
|
|
if (asdf) {
|
|
>asdf : any
|
|
}
|
|
else if (qwerty) {
|
|
>qwerty : any
|
|
}
|
|
|
|
try {
|
|
}
|
|
catch (asdf) { // no error
|
|
>asdf : any
|
|
}
|
|
|
|
switch (asdf) {
|
|
>asdf : any
|
|
|
|
case qwerty:
|
|
>qwerty : any
|
|
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
var a = () => asdf;
|
|
>a : () => any
|
|
>() => asdf : () => any
|
|
>asdf : any
|
|
|
|
var b = (asdf) => { return qwerty };
|
|
>b : (asdf: any) => any
|
|
>(asdf) => { return qwerty } : (asdf: any) => any
|
|
>asdf : any
|
|
>qwerty : any
|
|
|
|
module N {
|
|
>N : typeof N
|
|
|
|
var x = 1;
|
|
>x : number
|
|
>1 : 1
|
|
}
|
|
import c = N;
|
|
>c : typeof N
|
|
>N : typeof N
|
|
|
|
import d = asdf;
|
|
>d : any
|
|
>asdf : any
|
|
}
|