Skip to content

Commit

Permalink
better formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Jun 23, 2023
1 parent 862807b commit 4c2bcc9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5523,10 +5523,12 @@ function getVariableOrParameterDeclaration(contextToken: Node | undefined, locat
isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node)
? "quit"
: ((isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent)));
const possiblyVariableDeclaration = findAncestor(location, (node) => {
return isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ?
"quit" : isVariableDeclaration(node);
});

const possiblyVariableDeclaration = findAncestor(location, node =>
isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node)
? "quit"
: isVariableDeclaration(node));

return (possiblyParameterDeclaration || possiblyVariableDeclaration) as ParameterDeclaration | TypeParameterDeclaration | VariableDeclaration | undefined;
}

Expand Down

0 comments on commit 4c2bcc9

Please sign in to comment.