TypeScript/tests/baselines/reference/unknownSymbols2.types
Anders Hejlsberg a4f9bf0fce
Create type aliases for unresolved type symbols (#45976)
* Create type aliases for unresolved type symbols

* Accept new baselines

* Update fourslash tests

* Unresolved import aliases create tagged unresolved symbols

* Add comments

* Accept new baselines

* Add fourslash tests
2021-09-23 13:21:27 -07:00

69 lines
978 B
Plaintext

=== tests/cases/compiler/unknownSymbols2.ts ===
module M {
>M : typeof M
var x: asdf;
>x : asdf
var y = x + asdf;
>y : any
>x + asdf : any
>x : asdf
>asdf : any
var z = <asdf>x; // should be an error
>z : asdf
><asdf>x : asdf
>x : asdf
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
}