We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playground
async function f () { class C { static a = await (Promise.resolve(1)) // error here } return C as any } f().then(c => { console.log(c.a) })
ReferenceError: await is not defined when target below es2020
ReferenceError: await is not defined
No error at wait. Output: 1
The text was updated successfully, but these errors were encountered:
Related:
this
Sorry, something went wrong.
/cc: @sandersn @rbuckton
Any suggestions? Happy to work on these too.
staticFieldDefinition[?Yield, ?Await]
from https://tc39.es/proposal-static-class-features/#prod-ClassElement
And
const initializer = doOutsideOfContext(NodeFlags.YieldContext | NodeFlags.AwaitContext | NodeFlags.DisallowInContext, parseInitializer);
In parsePropertyDeclaration.
parsePropertyDeclaration
Holy shit. I have confused about this.
Successfully merging a pull request may close this issue.
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground
π» Code
π Actual behavior
ReferenceError: await is not defined
when target below es2020π Expected behavior
No error at wait.
Output: 1
The text was updated successfully, but these errors were encountered: