@@ -3062,7 +3062,7 @@ namespace ts {
3062
3062
}
3063
3063
return true ;
3064
3064
}
3065
- else if ( jsxContainer ) {
3065
+ else if ( jsxContainer ) {
3066
3066
let attrsType : Type ;
3067
3067
if ( ( jsxContainer . kind === SyntaxKind . JsxSelfClosingElement ) || ( jsxContainer . kind === SyntaxKind . JsxOpeningElement ) ) {
3068
3068
// Cursor is inside a JSX self-closing element or opening element
@@ -3162,7 +3162,7 @@ namespace ts {
3162
3162
switch ( previousToken . kind ) {
3163
3163
case SyntaxKind . CommaToken :
3164
3164
return containingNodeKind === SyntaxKind . CallExpression // func( a, |
3165
- || containingNodeKind === SyntaxKind . Constructor // constructor( a, | public, protected, private keywords are allowed here, so show completion
3165
+ || containingNodeKind === SyntaxKind . Constructor // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */
3166
3166
|| containingNodeKind === SyntaxKind . NewExpression // new C(a, |
3167
3167
|| containingNodeKind === SyntaxKind . ArrayLiteralExpression // [a, |
3168
3168
|| containingNodeKind === SyntaxKind . BinaryExpression // let x = (a, |
@@ -3173,10 +3173,12 @@ namespace ts {
3173
3173
|| containingNodeKind === SyntaxKind . Constructor // constructor( |
3174
3174
|| containingNodeKind === SyntaxKind . NewExpression // new C(a|
3175
3175
|| containingNodeKind === SyntaxKind . ParenthesizedExpression // let x = (a|
3176
- || containingNodeKind === SyntaxKind . ParenthesizedType ; // function F(pred: (a| this can become an arrow function, where 'a' is the argument
3176
+ || containingNodeKind === SyntaxKind . ParenthesizedType ; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */
3177
3177
3178
3178
case SyntaxKind . OpenBracketToken :
3179
- return containingNodeKind === SyntaxKind . ArrayLiteralExpression ; // [ |
3179
+ return containingNodeKind === SyntaxKind . ArrayLiteralExpression // [ |
3180
+ || containingNodeKind === SyntaxKind . IndexSignature // [ | : string ]
3181
+ || containingNodeKind === SyntaxKind . ComputedPropertyName // [ | /* this can become an index signature */
3180
3182
3181
3183
case SyntaxKind . ModuleKeyword : // module |
3182
3184
case SyntaxKind . NamespaceKeyword : // namespace |
0 commit comments