From 4c2bcc935563e509add094cc86ed5fb7eb82f51f Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Fri, 23 Jun 2023 03:35:37 +0300 Subject: [PATCH] better formatting --- src/services/completions.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/services/completions.ts b/src/services/completions.ts index bb76d07c10f11..d39b357776885 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -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; }