File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1192,7 +1192,7 @@ export function getDocumentSymbols(document: TextDocument): DocumentSymbol[] {
1192
1192
...declarations ,
1193
1193
...whereClausesDeclarations ,
1194
1194
...typeDeclarations ,
1195
- ] . map ( ( node ) => createDocumentSymbol ( node , document ) ) ;
1195
+ ] . map ( ( node ) => extractDocumentSymbolFromDeclaration ( node , document ) ) ;
1196
1196
}
1197
1197
1198
1198
function findNodesOfType ( rootNode : SyntaxNode , type : string ) : SyntaxNode [ ] {
@@ -1221,11 +1221,12 @@ function findWhereClauseDeclarations(rootNode: SyntaxNode): SyntaxNode[] {
1221
1221
return declarations ;
1222
1222
}
1223
1223
1224
- function createDocumentSymbol (
1224
+ function extractDocumentSymbolFromDeclaration (
1225
1225
node : SyntaxNode ,
1226
1226
document : TextDocument ,
1227
1227
) : DocumentSymbol {
1228
1228
let bindingNode : SyntaxNode | null | undefined = node . child ( 0 ) ;
1229
+
1229
1230
// For normal declarations, the id is nested inside a pattern
1230
1231
if ( node . type === "declaration" ) bindingNode = bindingNode ?. child ( 0 ) ;
1231
1232
You can’t perform that action at this time.
0 commit comments