File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
snapshots/input/pure-js/src Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -49,5 +49,5 @@ function var_function_scope() {
49
49
}
50
50
51
51
function array_of_objects ( ) {
52
- [ { element : 0 } , { element : 1 } ]
52
+ ; [ { element : 0 } , { element : 1 } ]
53
53
}
Original file line number Diff line number Diff line change @@ -147,7 +147,10 @@ export class FileIndexer {
147
147
return false
148
148
}
149
149
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 {
151
154
if ( ! ts . isPropertyAssignment ( node . parent ) ) {
152
155
return
153
156
}
@@ -161,8 +164,9 @@ export class FileIndexer {
161
164
private visitSymbolOccurrence ( node : ts . Node , sym : ts . Symbol ) : void {
162
165
const range = Range . fromNode ( node ) . toLsif ( )
163
166
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 )
166
170
if ( isDefinitionNode ) {
167
171
role |= scip . scip . SymbolRole . Definition
168
172
}
@@ -679,7 +683,9 @@ export class FileIndexer {
679
683
onAncestor ( declaration )
680
684
}
681
685
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 )
683
689
for ( const symbolDeclaration of tpe . symbol ?. declarations || [ ] ) {
684
690
loop ( symbolDeclaration )
685
691
}
You can’t perform that action at this time.
0 commit comments