diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6db26355d92..f5c4d880072 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1309,7 +1309,7 @@ namespace ts { case ParsingContext.ObjectBindingElements: return token() === SyntaxKind.OpenBracketToken || token() === SyntaxKind.DotDotDotToken || isLiteralPropertyName(); case ParsingContext.HeritageClauseElement: - // If we see { } then only consume it as an expression if it is followed by `,` or `{` + // If we see `{ ... }` then only consume it as an expression if it is followed by `,` or `{` // That way we won't consume the body of a class in its heritage clause. if (token() === SyntaxKind.OpenBraceToken) { return lookAhead(isValidHeritageClauseObjectLiteral);