File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/typescript-plugin/lib Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ function getCompletionsAtPosition<T>(
88
88
] ) ;
89
89
90
90
if ( ranges . some ( ( [ start , end ] ) => position >= start && position <= end ) ) {
91
+ const globalKinds = new Set ( [ 'var' , 'function' , 'module' ] ) ;
91
92
const globalsOrKeywords = ( ts as any ) . Completions . SortText . GlobalsOrKeywords ;
92
93
const sortTexts = new Set ( [
93
94
globalsOrKeywords ,
@@ -97,7 +98,7 @@ function getCompletionsAtPosition<T>(
97
98
98
99
result . entries = result . entries . filter ( entry =>
99
100
! ( entry . kind === 'const' && entry . name in vueOptions . macros ) && (
100
- entry . kind !== 'var' && entry . kind !== 'function'
101
+ ! globalKinds . has ( entry . kind )
101
102
|| ! sortTexts . has ( entry . sortText )
102
103
|| isGloballyAllowed ( entry . name )
103
104
)
You can’t perform that action at this time.
0 commit comments