-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScript
Milestone
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
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript