1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
//// [tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts] ////
=== types.forAwait.es2018.3.ts ===
async function f1() {
>f1 : () => Promise<void>
let y: number;
>y : number
for await (const x of {}) {
>x : any
>{} : {}
}
for await (y of {}) {
>y : number
>{} : {}
}
}
async function* f2() {
>f2 : () => {}
let y: number;
>y : number
for await (const x of {}) {
>x : any
>{} : {}
}
for await (y of {}) {
>y : number
>{} : {}
}
}
|