Skip to content

ZNTC0901: 'await' expression is not allowed in formal parameters

‘await’ expression is not allowed in formal parameters

Category: Parser: Await/Yield/JSX/TS

async function f(x = await 1) {}

Reproduce in Playground →

See the error message for cause and resolution.