Skip to content

ZNTC0902: 'await' is not allowed in class static initializer

‘await’ is not allowed in class static initializer

Category: Parser: Await/Yield/JSX/TS

class C { static x = await 1; }

Reproduce in Playground →

See the error message for cause and resolution.