import type { TextlintFixResult } from "@textlint/types"; /** * Get the content of the source before fixing by `filePath` of the result. * It returns `undefined` if the caller does not have the content. */ export type FormatterGetSource = (filePath: string) => string | undefined; export type FormatterConfig = { color?: boolean; formatterName: string; /** * Get the content of the source before fixing by `filePath` of the result. * For example, "diff" formatter uses it. * If it is not given or returns `undefined`, the formatter gets the content of the file of `filePath`. */ getSource?: FormatterGetSource; }; /** * The options that the formatter receives. * `loadFormatter()` always passes `getSource`. */ export type FormatterOptions = FormatterConfig & { getSource: FormatterGetSource; }; export declare function loadFormatter(config: FormatterConfig): Promise<{ format(results: TextlintFixResult[]): string; }>; export interface FixerFormatterDetail { name: string; } export declare function getFixerFormatterList(): FixerFormatterDetail[]; //# sourceMappingURL=index.d.ts.map