Parse parameter decorators outside of Await context when appropriate (#50040)

This commit is contained in:
Ron Buckton
2022-07-25 17:17:27 -04:00
committed by GitHub
parent a179e910dd
commit 12dbdf03b1
6 changed files with 117 additions and 1 deletions

View File

@@ -3337,7 +3337,7 @@ namespace ts {
// BindingElement[?Yield,?Await]
// Decorators are parsed in the outer [Await] context, the rest of the parameter is parsed in the function's [Await] context.
const decorators = inOuterAwaitContext ? doInAwaitContext(parseDecorators) : parseDecorators();
const decorators = inOuterAwaitContext ? doInAwaitContext(parseDecorators) : doOutsideOfAwaitContext(parseDecorators);
if (token() === SyntaxKind.ThisKeyword) {
const node = factory.createParameterDeclaration(