diff --git a/src/services/utilities.ts b/src/services/utilities.ts index cd7d48e7d0a..ca047414e59 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -131,11 +131,17 @@ module ts { case SyntaxKind.ArrayLiteralExpression: case SyntaxKind.ArrayBindingPattern: - case SyntaxKind.IndexSignature: case SyntaxKind.ComputedPropertyName: case SyntaxKind.TupleType: return nodeEndsWith(n, SyntaxKind.CloseBracketToken, sourceFile); + case SyntaxKind.IndexSignature: + if ((n).type) { + return isCompletedNode((n).type, sourceFile); + } + + return hasChildOfKind(n, SyntaxKind.CloseBracketToken, sourceFile); + case SyntaxKind.CaseClause: case SyntaxKind.DefaultClause: // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicitly always consider them non-completed