import type { Writable } from "node:stream";
export interface BoundedWriterOptions {
    maxFrameBytes: number;
    maxQueuedBytes: number;
}
/** A byte-accounted, one-write-at-a-time stream writer with replaceable updates. */
export declare class BoundedWriter {
    private readonly critical;
    private readonly coalesced;
    private readonly capacityWaiters;
    private queuedBytes;
    private pumping;
    private closedError;
    private readonly stream;
    private readonly options;
    constructor(stream: Writable, options: BoundedWriterOptions);
    get pendingBytes(): number;
    write(text: string): Promise<void>;
    offerLatest(key: string, text: string): boolean;
    close(error?: Error): void;
    private frame;
    private next;
    private pump;
    private runPump;
    private wakeCapacityWaiters;
}
//# sourceMappingURL=bounded-writer.d.ts.map