File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
typescript/src/completions Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export default (entries: ts.CompletionEntry[]) => {
3333 }
3434 if ( methodSnippetInsertTextMode === 'only-local' && entry . source ) return
3535 if ( ! symbol ) return
36- const { valueDeclaration } = symbol
36+ const { valueDeclaration = symbol . declarations ?. [ 0 ] } = symbol
3737 if ( ! valueDeclaration ) return
3838
3939 // const dateNow = Date.now()
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default (entries: ts.CompletionEntry[]) => {
99 // eslint-disable-next-line prefer-destructuring
1010 const symbol : ts . Symbol | undefined = entry [ 'symbol' ]
1111 if ( ! symbol ) return
12- const { valueDeclaration } = symbol
12+ const { valueDeclaration = symbol . declarations ?. [ 0 ] } = symbol
1313 if ( ! valueDeclaration ) return
1414 if ( valueDeclaration . getSourceFile ( ) . fileName !== sourceFile . fileName ) return - 1
1515 return valueDeclaration . pos
You can’t perform that action at this time.
0 commit comments