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[]) => {
33
33
}
34
34
if ( methodSnippetInsertTextMode === 'only-local' && entry . source ) return
35
35
if ( ! symbol ) return
36
- const { valueDeclaration } = symbol
36
+ const { valueDeclaration = symbol . declarations ?. [ 0 ] } = symbol
37
37
if ( ! valueDeclaration ) return
38
38
39
39
// const dateNow = Date.now()
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default (entries: ts.CompletionEntry[]) => {
9
9
// eslint-disable-next-line prefer-destructuring
10
10
const symbol : ts . Symbol | undefined = entry [ 'symbol' ]
11
11
if ( ! symbol ) return
12
- const { valueDeclaration } = symbol
12
+ const { valueDeclaration = symbol . declarations ?. [ 0 ] } = symbol
13
13
if ( ! valueDeclaration ) return
14
14
if ( valueDeclaration . getSourceFile ( ) . fileName !== sourceFile . fileName ) return - 1
15
15
return valueDeclaration . pos
You can’t perform that action at this time.
0 commit comments