import { TSESLint, TSESTree } from "@typescript-eslint/utils"; import type { StringEdit } from "./stringEdit.js"; /** * The command IDs of a file: the IDs of the object literals passed to * addCommand(), and of every other object literal with a name as well, which * may be a command defined elsewhere, as in an array of commands. */ export interface CommandIds { /** Takes the ID of an object literal, if it may be a command's. */ add(object: TSESTree.ObjectExpression): void; has(id: string): boolean; } export declare function commandIds(): CommandIds; /** * The new ID and the fix of the suggestion that rewrites the command ID `literal` as * `edit` has it, in the same quotes and escapes. Null where it cannot be * written back, or where another command in the file already has that ID. */ export declare function idRewrite(literal: TSESTree.StringLiteral, edit: StringEdit | null, ids: CommandIds): { id: string; fix: TSESLint.ReportFixFunction; } | null;