mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
At '.' in array literal, don't close the array (#28120)
This commit is contained in:
@@ -1518,8 +1518,10 @@ namespace ts {
|
||||
case ParsingContext.TypeParameters:
|
||||
return isIdentifier();
|
||||
case ParsingContext.ArrayLiteralMembers:
|
||||
if (token() === SyntaxKind.CommaToken) {
|
||||
return true;
|
||||
switch (token()) {
|
||||
case SyntaxKind.CommaToken:
|
||||
case SyntaxKind.DotToken: // Not an array literal member, but don't want to close the array (see `tests/cases/fourslash/completionsDotInArrayLiteralInObjectLiteral.ts`)
|
||||
return true;
|
||||
}
|
||||
// falls through
|
||||
case ParsingContext.ArgumentExpressions:
|
||||
|
||||
Reference in New Issue
Block a user