mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-17 21:09:09 -05:00
Consistently use '...args' for diagnostic args (#53193)
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
createMultiMap,
|
||||
Debug,
|
||||
Diagnostic,
|
||||
DiagnosticAndArguments,
|
||||
DiagnosticOrDiagnosticAndArguments,
|
||||
diagnosticToString,
|
||||
DiagnosticWithLocation,
|
||||
FileTextChanges,
|
||||
@@ -28,17 +28,17 @@ const errorCodeToFixes = createMultiMap<string, CodeFixRegistration>();
|
||||
const fixIdToRegistration = new Map<string, CodeFixRegistration>();
|
||||
|
||||
/** @internal */
|
||||
export function createCodeFixActionWithoutFixAll(fixName: string, changes: FileTextChanges[], description: DiagnosticAndArguments) {
|
||||
export function createCodeFixActionWithoutFixAll(fixName: string, changes: FileTextChanges[], description: DiagnosticOrDiagnosticAndArguments) {
|
||||
return createCodeFixActionWorker(fixName, diagnosticToString(description), changes, /*fixId*/ undefined, /*fixAllDescription*/ undefined);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function createCodeFixAction(fixName: string, changes: FileTextChanges[], description: DiagnosticAndArguments, fixId: {}, fixAllDescription: DiagnosticAndArguments, command?: CodeActionCommand): CodeFixAction {
|
||||
export function createCodeFixAction(fixName: string, changes: FileTextChanges[], description: DiagnosticOrDiagnosticAndArguments, fixId: {}, fixAllDescription: DiagnosticOrDiagnosticAndArguments, command?: CodeActionCommand): CodeFixAction {
|
||||
return createCodeFixActionWorker(fixName, diagnosticToString(description), changes, fixId, diagnosticToString(fixAllDescription), command);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function createCodeFixActionMaybeFixAll(fixName: string, changes: FileTextChanges[], description: DiagnosticAndArguments, fixId?: {}, fixAllDescription?: DiagnosticAndArguments, command?: CodeActionCommand) {
|
||||
export function createCodeFixActionMaybeFixAll(fixName: string, changes: FileTextChanges[], description: DiagnosticOrDiagnosticAndArguments, fixId?: {}, fixAllDescription?: DiagnosticOrDiagnosticAndArguments, command?: CodeActionCommand) {
|
||||
return createCodeFixActionWorker(fixName, diagnosticToString(description), changes, fixId, fixAllDescription && diagnosticToString(fixAllDescription), command);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user