mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Add builder in computed properties and index signatures.
This commit is contained in:
parent
e8a1f16e62
commit
7abe8a1550
@ -3062,7 +3062,7 @@ namespace ts {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if(jsxContainer) {
|
||||
else if (jsxContainer) {
|
||||
let attrsType: Type;
|
||||
if ((jsxContainer.kind === SyntaxKind.JsxSelfClosingElement) || (jsxContainer.kind === SyntaxKind.JsxOpeningElement)) {
|
||||
// Cursor is inside a JSX self-closing element or opening element
|
||||
@ -3162,7 +3162,7 @@ namespace ts {
|
||||
switch (previousToken.kind) {
|
||||
case SyntaxKind.CommaToken:
|
||||
return containingNodeKind === SyntaxKind.CallExpression // func( a, |
|
||||
|| containingNodeKind === SyntaxKind.Constructor // constructor( a, | public, protected, private keywords are allowed here, so show completion
|
||||
|| containingNodeKind === SyntaxKind.Constructor // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */
|
||||
|| containingNodeKind === SyntaxKind.NewExpression // new C(a, |
|
||||
|| containingNodeKind === SyntaxKind.ArrayLiteralExpression // [a, |
|
||||
|| containingNodeKind === SyntaxKind.BinaryExpression // let x = (a, |
|
||||
@ -3173,10 +3173,12 @@ namespace ts {
|
||||
|| containingNodeKind === SyntaxKind.Constructor // constructor( |
|
||||
|| containingNodeKind === SyntaxKind.NewExpression // new C(a|
|
||||
|| containingNodeKind === SyntaxKind.ParenthesizedExpression // let x = (a|
|
||||
|| containingNodeKind === SyntaxKind.ParenthesizedType; // function F(pred: (a| this can become an arrow function, where 'a' is the argument
|
||||
|| containingNodeKind === SyntaxKind.ParenthesizedType; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */
|
||||
|
||||
case SyntaxKind.OpenBracketToken:
|
||||
return containingNodeKind === SyntaxKind.ArrayLiteralExpression; // [ |
|
||||
return containingNodeKind === SyntaxKind.ArrayLiteralExpression // [ |
|
||||
|| containingNodeKind === SyntaxKind.IndexSignature // [ | : string ]
|
||||
|| containingNodeKind === SyntaxKind.ComputedPropertyName // [ | /* this can become an index signature */
|
||||
|
||||
case SyntaxKind.ModuleKeyword: // module |
|
||||
case SyntaxKind.NamespaceKeyword: // namespace |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user