import type { Writable } from 'node:stream'; /** * Adds an `'error'` listener to each stream that calls `exit(1)` on `EPIPE` (the reader * closed the pipe early, e.g. `astro check | head`) instead of crashing with a stack trace, * and rethrows any other error. Exiting stops work, such as `--watch`, whose output can no * longer reach anyone. */ export declare function exitOnEpipe(streams?: Writable[], exit?: (code: number) => void): void; /** * Waits until every write already queued on the streams has been handled, then * calls `exit(code)`. Each stream's write callback runs even if the stream has * errored or been destroyed, so this cannot hang on a closed pipe. */ export declare function flushAndExit(code: number, streams?: Writable[], exit?: (code: number) => void): Promise;