/** A command that emits a unified diff on stdout, such as `git diff` or `gh pr diff`. */ export interface DiffCommand { readonly executable: string; readonly args: readonly string[]; readonly cwd?: string; } export type DiffBlockCallback = (block: string) => void | Promise; export declare class DiffCommandError extends Error { readonly command: DiffCommand; readonly details: { code?: number | null; signal?: NodeJS.Signals | null; stderr: string; }; constructor(command: DiffCommand, details: { code?: number | null; signal?: NodeJS.Signals | null; stderr: string; }, options?: ErrorOptions); } /** * Spawns a command without a shell and emits its unified-diff output one file patch at a time. * A preamble is retained with the first patch (or emitted alone); callbacks are provisional until * this promise resolves, because a later command failure rejects after prior patches were emitted. */ export declare function processDiffCommand(command: DiffCommand, onBlock: DiffBlockCallback): Promise;