/** Minimal write sink: anything that accepts a string chunk. */ export interface WriteTarget { write(chunk: string): unknown; } /** Write a line to a target, defaulting to stdout. */ export declare function echo(message: string, target?: WriteTarget): void; /** Write a line to a target, defaulting to stderr. */ export declare function echoError(message: string, target?: WriteTarget): void; /** * Override the default stdout/stderr targets. * * Returns a rollback function that restores the previous targets. */ export declare function setDefaultOutputTargets(opts: { stdout?: WriteTarget; stderr?: WriteTarget; }): () => void; /** Terminates the current process with `code`. Anything matching `(code?: number) => never`. */ export type ExitTarget = (code?: number) => never; /** * Terminate the process with the given exit code — the single sanctioned seam * for `process.exit` in the workspace (enforced by the `no-direct-process-exit` * spur rule). Defaults to `0`. Pass or set an {@link ExitTarget} to intercept * in tests or non-`process` runtimes. */ export declare function exitProcess(code?: number, target?: ExitTarget): never; /** * Override the default exit target. * * Returns a rollback function that restores the previous target. */ export declare function setDefaultExitTarget(target: ExitTarget | undefined): () => void; /** In-memory `WriteTarget` that records all chunks for later retrieval. */ export interface BufferTarget extends WriteTarget { readonly chunks: string[]; text(): string; clear(): void; } /** Create an in-memory {@link BufferTarget} for capturing output during tests or tooling. */ export declare function createBufferTarget(): BufferTarget; //# sourceMappingURL=output.d.ts.map