@@ -22,8 +22,8 @@ export function preprocessLanguageService(
2222 getCodeFixesAtPosition,
2323 } = languageService ;
2424
25- languageService . getQuickInfoAtPosition = ( fileName , position , maximumLength ) => {
26- const result = getQuickInfoAtPosition ( fileName , position , maximumLength ) ;
25+ languageService . getQuickInfoAtPosition = ( fileName , position , ... rests ) => {
26+ const result = getQuickInfoAtPosition ( fileName , position , ... rests ) ;
2727 if ( ! result ) {
2828 return result ;
2929 }
@@ -52,7 +52,7 @@ export function preprocessLanguageService(
5252 ( data : VueCodeInformation ) => ! ! data . __importCompletion ,
5353 ) ;
5454 if ( generatedOffset2 !== undefined ) {
55- const extraInfo = getQuickInfoAtPosition ( fileName , generatedOffset2 , maximumLength ) ;
55+ const extraInfo = getQuickInfoAtPosition ( fileName , generatedOffset2 , ... rests ) ;
5656 if ( extraInfo ) {
5757 result . tags ??= [ ] ;
5858 result . tags . push ( ...extraInfo . tags ?? [ ] ) ;
@@ -61,8 +61,8 @@ export function preprocessLanguageService(
6161 }
6262 return result ;
6363 } ;
64- languageService . getSuggestionDiagnostics = fileName => {
65- const result = getSuggestionDiagnostics ( fileName ) ;
64+ languageService . getSuggestionDiagnostics = ( fileName , ... rests ) => {
65+ const result = getSuggestionDiagnostics ( fileName , ... rests ) ;
6666 const language = getLanguage ( ) ;
6767 if ( ! language ) {
6868 return result ;
@@ -100,8 +100,8 @@ export function preprocessLanguageService(
100100 }
101101 return result ;
102102 } ;
103- languageService . getCompletionsAtPosition = ( fileName , position , preferences , formatOptions ) => {
104- const result = getCompletionsAtPosition ( fileName , position , preferences , formatOptions ) ;
103+ languageService . getCompletionsAtPosition = ( fileName , position , ... rests ) => {
104+ const result = getCompletionsAtPosition ( fileName , position , ... rests ) ;
105105 if ( ! result ) {
106106 return result ;
107107 }
@@ -130,7 +130,7 @@ export function preprocessLanguageService(
130130 ( data : VueCodeInformation ) => ! ! data . __importCompletion ,
131131 ) ;
132132 if ( generatedOffset2 !== undefined ) {
133- const completion2 = getCompletionsAtPosition ( fileName , generatedOffset2 , preferences , formatOptions ) ;
133+ const completion2 = getCompletionsAtPosition ( fileName , generatedOffset2 , ... rests ) ;
134134 if ( completion2 ) {
135135 const nameToIndex = new Map ( result . entries . map ( ( entry , index ) => [ entry . name , index ] ) ) ;
136136 for ( const entry of completion2 . entries ) {
@@ -153,8 +153,8 @@ export function preprocessLanguageService(
153153 }
154154 return result ;
155155 } ;
156- languageService . getCodeFixesAtPosition = ( fileName , start , end , errorCodes , formatOptions , preferences ) => {
157- let result = getCodeFixesAtPosition ( fileName , start , end , errorCodes , formatOptions , preferences ) ;
156+ languageService . getCodeFixesAtPosition = ( fileName , start , end , errorCodes , ... rests ) => {
157+ let result = getCodeFixesAtPosition ( fileName , start , end , errorCodes , ... rests ) ;
158158 // Property 'xxx' does not exist on type 'yyy'.ts(2339)
159159 if ( ! errorCodes . includes ( 2339 ) ) {
160160 return result ;
@@ -192,8 +192,7 @@ export function preprocessLanguageService(
192192 generateRange2 [ 0 ] ,
193193 generateRange2 [ 1 ] ,
194194 [ 2304 ] , // Cannot find name 'xxx'.ts(2304)
195- formatOptions ,
196- preferences ,
195+ ...rests ,
197196 ) ;
198197 importFixes = importFixes . filter ( fix => fix . fixName === 'import' ) ;
199198 result = result . concat ( importFixes ) ;
@@ -283,9 +282,9 @@ export function postprocessLanguageService<T>(
283282 function getCompletionsAtPosition (
284283 getCompletionsAtPosition : ts . LanguageService [ 'getCompletionsAtPosition' ] ,
285284 ) : ts . LanguageService [ 'getCompletionsAtPosition' ] {
286- return ( filePath , position , options , formattingSettings ) => {
285+ return ( filePath , position , ... rests ) => {
287286 const fileName = filePath . replace ( windowsPathReg , '/' ) ;
288- const result = getCompletionsAtPosition ( fileName , position , options , formattingSettings ) ;
287+ const result = getCompletionsAtPosition ( fileName , position , ... rests ) ;
289288 if ( result ) {
290289 resolveCompletionResult (
291290 ts ,
@@ -327,8 +326,8 @@ export function postprocessLanguageService<T>(
327326 function getDefinitionAndBoundSpan (
328327 getDefinitionAndBoundSpan : ts . LanguageService [ 'getDefinitionAndBoundSpan' ] ,
329328 ) : ts . LanguageService [ 'getDefinitionAndBoundSpan' ] {
330- return ( fileName , position ) => {
331- const result = getDefinitionAndBoundSpan ( fileName , position ) ;
329+ return ( fileName , position , ... rests ) => {
330+ const result = getDefinitionAndBoundSpan ( fileName , position , ... rests ) ;
332331
333332 const program = languageService . getProgram ( ) ! ;
334333 const sourceScript = language . scripts . get ( asScriptId ( fileName ) ) ;
@@ -421,7 +420,7 @@ export function postprocessLanguageService<T>(
421420 }
422421
423422 const pos = type . indexType . getStart ( sourceFile ) ;
424- const res = getDefinitionAndBoundSpan ( fileName , pos ) ;
423+ const res = getDefinitionAndBoundSpan ( fileName , pos , ... rests ) ;
425424 if ( res ?. definitions ?. length ) {
426425 for ( const definition of res . definitions ) {
427426 definitions . add ( definition ) ;
0 commit comments