24 lines
540 B
Text
24 lines
540 B
Text
=== tests/cases/compiler/asyncIIFE.ts ===
|
|
function f1() {
|
|
>f1 : () => void
|
|
|
|
(async () => {
|
|
>(async () => { await 10 throw new Error(); })() : Promise<never>
|
|
>(async () => { await 10 throw new Error(); }) : () => Promise<never>
|
|
>async () => { await 10 throw new Error(); } : () => Promise<never>
|
|
|
|
await 10
|
|
>await 10 : 10
|
|
>10 : 10
|
|
|
|
throw new Error();
|
|
>new Error() : Error
|
|
>Error : ErrorConstructor
|
|
|
|
})();
|
|
|
|
var x = 1;
|
|
>x : number
|
|
>1 : 1
|
|
}
|
|
|