Remove spurious lookAhead, as this fn is already in a lookAhead

This commit is contained in:
David Souther 2022-05-09 10:53:58 -07:00
parent 958adfc9d8
commit e9d39bd95f

View File

@ -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;
}