interface AbortOptions { signal?: AbortSignal; } interface BasePushable { /** * End the iterable after all values in the buffer (if any) have been yielded. If an * error is passed the buffer is cleared immediately and the next iteration will * throw the passed error */ end(err?: Error): this; /** * Push a value into the iterable. Values are yielded from the iterable in the order * they are pushed. Values not yet consumed from the iterable are buffered. */ push(value: T): this; /** * Returns a promise that resolves when the underlying queue becomes empty (e.g. * this.readableLength === 0). * * If an AbortSignal is passed as an option and that signal aborts, it only * causes the returned promise to reject - it does not end the pushable. */ onEmpty(options?: AbortOptions): Promise; /** * This property contains the number of bytes (or objects) in the queue ready to be read. * * If `objectMode` is true, this is the number of objects in the queue, if false it's the * total number of bytes in the queue. */ readableLength: number; } /** * An iterable that you can push values into. */ interface Pushable extends AsyncGenerator, BasePushable { } declare function mapAsync(stream: AsyncIterable, mapFn: (value: T) => U | PromiseLike): AsyncGenerator; declare function cloneAsync(stream: AsyncIterable, target: Pushable): AsyncGenerator; declare function joinAsync(stream: AsyncIterable, separator?: string): AsyncGenerator; declare function splitAsync(stream: AsyncIterable, ...separator: string[]): AsyncGenerator; declare function filterAsync(stream: AsyncIterable, filterFn: (value: T) => value is TFiltered): AsyncGenerator; declare function castAsync(e: AsyncIterable): AsyncGenerator, void, unknown>; type BatchAsyncParams = { stream: AsyncIterable; split?: (i: T) => boolean; }; declare function batchAsync = AsyncIterable>(stream: TIterable, split?: (current: T, buffer: T[]) => boolean): AsyncGenerator; declare function delayAsync(stream: AsyncIterable, ms?: number): AsyncGenerator; declare function teeAsync(stream: AsyncIterable): [AsyncIterable, AsyncIterable]; declare function teePushableAsync(stream: Pushable): [AsyncIterable, Pushable]; declare function concatAsync(...streams: AsyncIterable[]): AsyncGenerator; declare function flatAsync(composed: AsyncGenerator>): AsyncGenerator; export { type BatchAsyncParams as B, type Pushable as P, castAsync as a, batchAsync as b, cloneAsync as c, delayAsync as d, teePushableAsync as e, filterAsync as f, concatAsync as g, flatAsync as h, joinAsync as j, mapAsync as m, splitAsync as s, teeAsync as t };