///
import { BufferLike } from '../interfaces';
import { Readable, ReadableOptions } from 'stream';
declare type AsyncSourceIterator = AsyncIterator;
export declare class AsyncIterableReadable extends Readable {
private _pulling;
private _objectMode;
private _iterator;
constructor(source: AsyncIterable, options?: ReadableOptions);
_read(size: number): void;
_destroy(err: Error | null, cb: (err: Error | null) => void): void;
_pull(it: AsyncSourceIterator, size: number): Promise;
}
/**
* Converts an existing async-iterable to a Node.js stream.
* @param source The async-iterable to convert to a Node.js stream.
* @param options The optional Readable options for the Node.js stream.
*/
export declare function toNodeStream(source: AsyncIterable): AsyncIterableReadable;
export declare function toNodeStream(source: AsyncIterable, options: ReadableOptions & {
objectMode: true;
}): AsyncIterableReadable;
export declare function toNodeStream(source: AsyncIterable, options: ReadableOptions & {
objectMode: false;
}): AsyncIterableReadable;
/**
* @ignore
*/
export declare function toNodeStreamProto(this: AsyncIterable): AsyncIterableReadable;
export declare function toNodeStreamProto(this: AsyncIterable, options: ReadableOptions & {
objectMode: true;
}): AsyncIterableReadable;
export declare function toNodeStreamProto(this: AsyncIterable, options: ReadableOptions & {
objectMode: false;
}): AsyncIterableReadable;
declare module '../asynciterable/asynciterablex' {
interface AsyncIterableX {
toNodeStream: typeof toNodeStreamProto;
}
}
export {};