import { BytePipe } from './pipe.ts';
import type { ByteSource } from './types.ts';
/** Feed one consuming write through a bounded pipe; finish waits for commit. */
export declare class ByteWriter {
    readonly pipe: BytePipe;
    private readonly task;
    private failed;
    private failure;
    constructor(consume: (source: ByteSource) => Promise<void>);
    write(data: Uint8Array): Promise<void>;
    /** Wait until the consumer asks for its first bytes; one that ended first, as a refused open does, throws its error. */
    opened(): Promise<void>;
    finish(): Promise<void>;
    abort(): Promise<void>;
}
//# sourceMappingURL=writer.d.ts.map