import type { AbortableAsyncMapper, AbortableAsyncPredicate, AbortableMapper, AbortablePredicate, Promisable } from '../types.js'; import { END } from '../types.js'; /** * Similar to Iterable2, but for AsyncIterable. * * AsyncIterable2 is a wrapper around AsyncIterable that implements "Iterator Helpers proposal": * https://github.com/tc39/proposal-iterator-helpers * * AsyncIterable2 can be removed after the proposal is widely implemented in Node & browsers. * * @experimental */ export declare class AsyncIterable2 implements AsyncIterable { private it; private constructor(); static of(it: AsyncIterable): AsyncIterable2; static ofIterable(it: Iterable): AsyncIterable2; static empty(): AsyncIterable2; [Symbol.asyncIterator](): AsyncIterator; toArray(): Promise; forEach(cb: (v: T, i: number) => Promisable): Promise; some(cb: AbortableAsyncPredicate): Promise; someSync(cb: AbortablePredicate): Promise; every(cb: AbortableAsyncPredicate): Promise; everySync(cb: AbortablePredicate): Promise; find(cb: AbortableAsyncPredicate): Promise; findSync(cb: AbortablePredicate): Promise; filter(cb: AbortableAsyncPredicate): AsyncIterable2; filterSync(cb: AbortablePredicate): AsyncIterable2; map(mapper: AbortableAsyncMapper): AsyncIterable2; mapSync(mapper: AbortableMapper): AsyncIterable2; }