import type { Writable } from "node:stream"; /** A one-write-at-a-time stream writer with replaceable updates. */ export declare class QueuedWriter { private readonly critical; private readonly coalesced; /** * The frame currently being written. It has already left the queue, so * `close()` would not see it; without this a stream callback failure (EPIPE * on a dying engine) leaves its `write()` promise pending forever and the * caller — a prompt, an abort — never learns the send failed. */ private active; private queuedBytes; private pumping; private closedError; private readonly stream; constructor(stream: Writable); get pendingBytes(): number; write(text: string): Promise; offerLatest(key: string, text: string): boolean; /** * Reject the in-flight frame and everything queued behind it. * * The error is classified as a transport failure before it is stored, so the * active frame, the queued frames, and every later `write()` all reject with * the same classified value — a raw stream `EPIPE` included. */ close(error?: Error): void; private next; private pump; private runPump; } //# sourceMappingURL=queued-writer.d.ts.map