///
import { Readable, Writable, AsyncQueue } from './interfaces.js';
import { ArrayBufferViewInput } from '../util/buffer.js';
/** @ignore */
export declare type WritableSink = Writable | WritableStream | NodeJS.WritableStream | null;
/** @ignore */
export declare type ReadableSource = Readable | PromiseLike | AsyncIterable | ReadableStream | NodeJS.ReadableStream | null;
/** @ignore */
export declare class AsyncByteQueue extends AsyncQueue {
write(value: ArrayBufferViewInput | Uint8Array): void;
toString(sync: true): string;
toString(sync?: false): Promise;
toUint8Array(sync: true): Uint8Array;
toUint8Array(sync?: false): Promise;
}
/** @ignore */
export declare class ByteStream implements IterableIterator {
private source;
constructor(source?: Iterable | ArrayBufferViewInput);
[Symbol.iterator](): this;
next(value?: any): IteratorResult;
throw(value?: any): any;
return(value?: any): any;
peek(size?: number | null): Uint8Array | null;
read(size?: number | null): Uint8Array | null;
}
/** @ignore */
export declare class AsyncByteStream implements Readable, AsyncIterableIterator {
private source;
constructor(source?: PromiseLike | Response | ReadableStream | NodeJS.ReadableStream | AsyncIterable | Iterable);
[Symbol.asyncIterator](): this;
next(value?: any): Promise>;
throw(value?: any): Promise;
return(value?: any): Promise;
get closed(): Promise;
cancel(reason?: any): Promise;
peek(size?: number | null): Promise;
read(size?: number | null): Promise;
}