We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c2e314 commit d9ab307Copy full SHA for d9ab307
src/services/completions.ts
@@ -1542,8 +1542,13 @@ namespace ts.Completions {
1542
}
1543
1544
function getVariableDeclaration(property: Node): VariableDeclaration | undefined {
1545
+
1546
+ const isArrowFunctionExpressionWithoutArrow = (node: Node) => {
1547
+ return node.parent && isArrowFunction(node.parent) && node.parent.body === node;
1548
+ };
1549
1550
const variableDeclaration = findAncestor(property, (node) => {
- if (isFunctionBlock(node) || isBindingPattern(node) || (isArrowFunction(node.parent) && node.parent.body === node)) {
1551
+ if (isFunctionBlock(node) || isArrowFunctionExpressionWithoutArrow(node) || isBindingPattern(node)) {
1552
return "quit";
1553
1554
0 commit comments