File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2468,8 +2468,14 @@ export function getCompletionEntriesFromSymbols(
24682468 }
24692469 // Filter out variables from their own initializers
24702470 // `const a = /* no 'a' here */`
2471- if ( tryCast ( variableOrParameterDeclaration , isVariableDeclaration ) && symbol . valueDeclaration === variableOrParameterDeclaration ) {
2472- return false ;
2471+ if ( variableOrParameterDeclaration && tryCast ( variableOrParameterDeclaration , isVariableDeclaration ) ) {
2472+ if ( symbol . valueDeclaration === variableOrParameterDeclaration ) {
2473+ return false ;
2474+ }
2475+ // const { a } = /* no 'a' here */;
2476+ if ( isBindingPattern ( variableOrParameterDeclaration . name ) && variableOrParameterDeclaration . name . elements . some ( e => e === symbol . valueDeclaration ) ) {
2477+ return false ;
2478+ }
24732479 }
24742480
24752481 // Filter out parameters from their own initializers
You can’t perform that action at this time.
0 commit comments