diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 35536bb2246..755c583b718 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4538,7 +4538,7 @@ namespace ts { // isn't actually allowed, but we want to treat it as a lambda so we can provide // a good error message. if (isModifierKind(second) && second !== SyntaxKind.AsyncKeyword && lookAhead(nextTokenIsIdentifier)) { - if (lookAhead(() => nextToken() === SyntaxKind.AsKeyword)) { + if (nextToken() === SyntaxKind.AsKeyword) { // https://github.com/microsoft/TypeScript/issues/44466 return Tristate.False; }