import { FormatterCommand, FormatterOption } from "../lib.js"; /** Placeholder substitution inputs for a consumer formatter invocation. */ export interface FormatterRunContext { /** Primary output directory the formatter should process (`{dir}`). */ dir: string; /** Optional generated test directory (`{testDir}`), when the target emits one. */ testDir?: string; } /** * Resolve the consumer-supplied formatter override for a target. * * Returns `null` when the emitter should run its built-in per-language * formatter (the `format: true`/unset default). A returned array means the * consumer declared explicit formatter command(s) that replace the built-in * post-pass. `format: false` never reaches here — callers gate on it before * invoking any formatter. */ export declare function resolveCustomFormatters(format: FormatterOption | null | undefined): FormatterCommand[] | null; /** * Substitute `{dir}` / `{testDir}` placeholders in a command's args. An * argument that references `{testDir}` is dropped entirely when the target has * no generated test directory, so a single spec works for targets with and * without test output. */ export declare function substituteFormatterArgs(args: string[], context: FormatterRunContext): string[]; /** * Run consumer-declared formatter command(s) over the emitted tree. * * Mirrors the built-in post-pass posture: it never fails the emit. A missing * binary or non-zero exit is reported through {@link warnFormatterUnavailable} * so presence-dependent drift stays attributable, and a declared `version` * that the installed tool does not satisfy emits a loud, non-fatal mismatch * warning before the command still runs. */ export declare function runCustomFormatters(commands: FormatterCommand[], context: FormatterRunContext): void;