@@ -365,7 +365,6 @@ namespace FourSlash {
365
365
366
366
function memoWrap ( ls : ts . LanguageService , target : TestState ) : ts . LanguageService {
367
367
const cacheableMembers : ( keyof typeof ls ) [ ] = [
368
- "getCompletionsAtPosition" ,
369
368
"getCompletionEntryDetails" ,
370
369
"getCompletionEntrySymbol" ,
371
370
"getQuickInfoAtPosition" ,
@@ -1221,7 +1220,7 @@ Actual: ${stringify(fullActual)}`);
1221
1220
}
1222
1221
1223
1222
private getCompletionListAtCaret ( options ?: FourSlashInterface . CompletionsAtOptions ) : ts . CompletionInfo {
1224
- return this . languageService . getCompletionsAtPosition ( this . activeFile . fileName , this . currentCaretPosition , options , options && options . settings ) ;
1223
+ return this . languageService . getCompletionsAtPosition ( this . activeFile . fileName , this . currentCaretPosition , options ) ;
1225
1224
}
1226
1225
1227
1226
private getCompletionEntryDetails ( entryName : string , source ?: string ) : ts . CompletionEntryDetails {
@@ -1719,7 +1718,7 @@ Actual: ${stringify(fullActual)}`);
1719
1718
Harness . IO . log ( stringify ( sigHelp ) ) ;
1720
1719
}
1721
1720
1722
- public printCompletionListMembers ( options : ts . GetCompletionsAtPositionOptions | undefined ) {
1721
+ public printCompletionListMembers ( options : ts . Options | undefined ) {
1723
1722
const completions = this . getCompletionListAtCaret ( options ) ;
1724
1723
this . printMembersOrCompletions ( completions ) ;
1725
1724
}
@@ -1818,7 +1817,7 @@ Actual: ${stringify(fullActual)}`);
1818
1817
}
1819
1818
else if ( prevChar === " " && / A - Z a - z _ / . test ( ch ) ) {
1820
1819
/* Completions */
1821
- this . languageService . getCompletionsAtPosition ( this . activeFile . fileName , offset , ts . defaultCompletionOptions , ts . defaultServicesSettings ) ;
1820
+ this . languageService . getCompletionsAtPosition ( this . activeFile . fileName , offset , ts . defaultOptions ) ;
1822
1821
}
1823
1822
1824
1823
if ( i % checkCadence === 0 ) {
@@ -2393,7 +2392,7 @@ Actual: ${stringify(fullActual)}`);
2393
2392
public applyCodeActionFromCompletion ( markerName : string , options : FourSlashInterface . VerifyCompletionActionOptions ) {
2394
2393
this . goToMarker ( markerName ) ;
2395
2394
2396
- const actualCompletion = this . getCompletionListAtCaret ( { ...ts . defaultCompletionOptions , includeExternalModuleExports : true } ) . entries . find ( e =>
2395
+ const actualCompletion = this . getCompletionListAtCaret ( { ...ts . defaultOptions , includeExternalModuleExports : true } ) . entries . find ( e =>
2397
2396
e . name === options . name && e . source === options . source ) ;
2398
2397
2399
2398
if ( ! actualCompletion . hasAction ) {
@@ -2445,7 +2444,7 @@ Actual: ${stringify(fullActual)}`);
2445
2444
const { fixId, newFileContent } = options ;
2446
2445
const fixIds = ts . mapDefined ( this . getCodeFixes ( this . activeFile . fileName ) , a => a . fixId ) ;
2447
2446
ts . Debug . assert ( ts . contains ( fixIds , fixId ) , "No available code fix has that group id." , ( ) => `Expected '${ fixId } '. Available action ids: ${ fixIds } ` ) ;
2448
- const { changes, commands } = this . languageService . getCombinedCodeFix ( { type : "file" , fileName : this . activeFile . fileName } , fixId , this . formatCodeSettings ) ;
2447
+ const { changes, commands } = this . languageService . getCombinedCodeFix ( { type : "file" , fileName : this . activeFile . fileName } , fixId , this . formatCodeSettings , ts . defaultOptions ) ;
2449
2448
assert . deepEqual ( commands , options . commands ) ;
2450
2449
assert ( changes . every ( c => c . fileName === this . activeFile . fileName ) , "TODO: support testing codefixes that touch multiple files" ) ;
2451
2450
this . applyChanges ( changes ) ;
@@ -2525,7 +2524,7 @@ Actual: ${stringify(fullActual)}`);
2525
2524
return ;
2526
2525
}
2527
2526
2528
- return this . languageService . getCodeFixesAtPosition ( fileName , diagnostic . start , diagnostic . start + diagnostic . length , [ diagnostic . code ] , this . formatCodeSettings ) ;
2527
+ return this . languageService . getCodeFixesAtPosition ( fileName , diagnostic . start , diagnostic . start + diagnostic . length , [ diagnostic . code ] , this . formatCodeSettings , ts . defaultOptions ) ;
2529
2528
} ) ;
2530
2529
}
2531
2530
@@ -4419,7 +4418,7 @@ namespace FourSlashInterface {
4419
4418
this . state . printCurrentSignatureHelp ( ) ;
4420
4419
}
4421
4420
4422
- public printCompletionListMembers ( options : ts . GetCompletionsAtPositionOptions | undefined ) {
4421
+ public printCompletionListMembers ( options : ts . Options | undefined ) {
4423
4422
this . state . printCompletionListMembers ( options ) ;
4424
4423
}
4425
4424
@@ -4616,12 +4615,11 @@ namespace FourSlashInterface {
4616
4615
}
4617
4616
4618
4617
export type ExpectedCompletionEntry = string | { name : string , insertText ?: string , replacementSpan ?: FourSlash . Range } ;
4619
- export interface CompletionsAtOptions extends ts . GetCompletionsAtPositionOptions {
4618
+ export interface CompletionsAtOptions extends Partial < ts . Options > {
4620
4619
isNewIdentifierLocation ?: boolean ;
4621
- settings ?: ts . ServicesSettings ;
4622
4620
}
4623
4621
4624
- export interface VerifyCompletionListContainsOptions extends ts . GetCompletionsAtPositionOptions {
4622
+ export interface VerifyCompletionListContainsOptions extends ts . Options {
4625
4623
sourceDisplay : string ;
4626
4624
isRecommended ?: true ;
4627
4625
insertText ?: string ;
0 commit comments