Skip to content

Commit bce1121

Browse files
author
Christoph
committed
formatting
1 parent 625bf95 commit bce1121

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

snapshots/input/pure-js/src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ function var_function_scope() {
4949
}
5050

5151
function array_of_objects() {
52-
[{ element: 0 }, { element: 1}]
52+
;[{ element: 0 }, { element: 1 }]
5353
}

src/FileIndexer.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ export class FileIndexer {
147147
return false
148148
}
149149

150-
private getDeclarationsForPropertyAssignment(node: ts.Node, sym: ts.Symbol): ts.Declaration[] | undefined {
150+
private getDeclarationsForPropertyAssignment(
151+
node: ts.Node,
152+
sym: ts.Symbol
153+
): ts.Declaration[] | undefined {
151154
if (!ts.isPropertyAssignment(node.parent)) {
152155
return
153156
}
@@ -161,8 +164,9 @@ export class FileIndexer {
161164
private visitSymbolOccurrence(node: ts.Node, sym: ts.Symbol): void {
162165
const range = Range.fromNode(node).toLsif()
163166
let role = 0
164-
let declarations: ts.Node[] = this.getDeclarationsForPropertyAssignment(node, sym) ?? [];
165-
let isDefinitionNode = declarations.length == 0 && isDefinition(node);
167+
let declarations: ts.Node[] =
168+
this.getDeclarationsForPropertyAssignment(node, sym) ?? []
169+
let isDefinitionNode = declarations.length == 0 && isDefinition(node)
166170
if (isDefinitionNode) {
167171
role |= scip.scip.SymbolRole.Definition
168172
}
@@ -679,7 +683,9 @@ export class FileIndexer {
679683
onAncestor(declaration)
680684
}
681685
if (ts.isObjectLiteralExpression(declaration)) {
682-
const tpe = this.checker.getContextualType(declaration) ?? this.checker.getTypeAtLocation(declaration);
686+
const tpe =
687+
this.checker.getContextualType(declaration) ??
688+
this.checker.getTypeAtLocation(declaration)
683689
for (const symbolDeclaration of tpe.symbol?.declarations || []) {
684690
loop(symbolDeclaration)
685691
}

0 commit comments

Comments
 (0)