Skip to content

Commit 0304b54

Browse files
author
Andy Hanson
committed
Update API (#24966)
1 parent 57f01bc commit 0304b54

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/services/codefixes/fixUnusedIdentifier.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ namespace ts.codefix {
209209
}
210210
}
211211

212+
/* @internal */
212213
namespace ts.codefix {
213214
export class Deleter {
214215
static with(context: textChanges.TextChangesContext, cb: (d: Deleter) => void): FileTextChanges[] {

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10681,6 +10681,7 @@ declare namespace ts {
1068110681
}
1068210682
function getLineStartPositionForPosition(position: number, sourceFile: SourceFileLike): number;
1068310683
function rangeContainsRange(r1: TextRange, r2: TextRange): boolean;
10684+
function rangeContainsRangeExclusive(r1: TextRange, r2: TextRange): boolean;
1068410685
function rangeContainsPosition(r: TextRange, pos: number): boolean;
1068510686
function rangeContainsPositionExclusive(r: TextRange, pos: number): boolean;
1068610687
function startEndContainsRange(start: number, end: number, range: TextRange): boolean;
@@ -11093,7 +11094,7 @@ declare namespace ts.FindAllReferences.Core {
1109311094
/** Used as a quick check for whether a symbol is used at all in a file (besides its definition). */
1109411095
function isSymbolReferencedInFile(definition: Identifier, checker: TypeChecker, sourceFile: SourceFile): boolean;
1109511096
function eachSymbolReferenceInFile<T>(definition: Identifier, checker: TypeChecker, sourceFile: SourceFile, cb: (token: Identifier) => T): T | undefined;
11096-
function eachSignatureCall(signature: SignatureDeclaration, sourceFiles: ReadonlyArray<SourceFile>, checker: TypeChecker, cb: (sourceFile: SourceFile, call: CallExpression) => void): void;
11097+
function eachSignatureCall(signature: SignatureDeclaration, sourceFiles: ReadonlyArray<SourceFile>, checker: TypeChecker, cb: (call: CallExpression) => void): void;
1109711098
/**
1109811099
* Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations
1109911100
* of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class
@@ -11562,8 +11563,10 @@ declare namespace ts {
1156211563
function getSupportedErrorCodes(): string[];
1156311564
function getFixes(context: CodeFixContext): CodeFixAction[];
1156411565
function getAllFixes(context: CodeFixAllContext): CombinedCodeActions;
11566+
function createCombinedCodeActions(changes: FileTextChanges[], commands?: CodeActionCommand[]): CombinedCodeActions;
1156511567
function createFileTextChanges(fileName: string, textChanges: TextChange[]): FileTextChanges;
1156611568
function codeFixAll(context: CodeFixAllContext, errorCodes: number[], use: (changes: textChanges.ChangeTracker, error: DiagnosticWithLocation, commands: Push<CodeActionCommand>) => void): CombinedCodeActions;
11569+
function eachDiagnostic({ program, sourceFile, cancellationToken }: CodeFixAllContext, errorCodes: number[], cb: (diag: DiagnosticWithLocation) => void): void;
1156711570
}
1156811571
}
1156911572
declare namespace ts {
@@ -11630,6 +11633,15 @@ declare namespace ts.codefix {
1163011633
}
1163111634
declare namespace ts.codefix {
1163211635
}
11636+
declare namespace ts.codefix {
11637+
class Deleter {
11638+
static with(context: textChanges.TextChangesContext, cb: (d: Deleter) => void): FileTextChanges[];
11639+
static withChanges(changes: textChanges.ChangeTracker, cb: (d: Deleter) => void): void;
11640+
private nodes;
11641+
add(node: Node): void;
11642+
private finish;
11643+
}
11644+
}
1163311645
declare namespace ts.codefix {
1163411646
}
1163511647
declare namespace ts.codefix {

0 commit comments

Comments
 (0)