Closed
Description
Bug Report
π Search Terms
π Version & Regression Information
- I was unable to test this on prior versions because _______
β― Playground Link
π» Code
async function f () {
class C {
static a = await (Promise.resolve(1)) // error here
}
return C as any
}
f().then(c => {
console.log(c.a)
})
π Actual behavior
ReferenceError: await is not defined
when target below es2020
π Expected behavior
No error at wait.
Output: 1