import type { OutputEvent, StreamName } from './types.ts';
/** One ordered output reader, sharing the byte pipe's capacity and chunks. */
export declare class OutputPipe {
    private readonly pipe;
    private readonly streams;
    private readonly lock;
    private reading;
    constructor(capacity?: number);
    get bufferedBytes(): number;
    get closedReader(): boolean;
    /** Accept one write in order, waiting for byte capacity. Empty writes have no event. */
    write(stream: StreamName, data: Uint8Array): Promise<void>;
    /** End output, preserving accepted events before a late failure. */
    end(error?: unknown): void;
    drain(): Promise<void>;
    /** Discard unread output and wake pending readers and writers. */
    closeReader(): void;
    /** Read once; close the reader before closing a pending iterator pull. */
    events(): AsyncGenerator<OutputEvent>;
}
//# sourceMappingURL=output.d.ts.map