Skip to main content

interface AsyncFastIterator<T>

An asynchronous iterator that extends the default AsyncIterator interface with methods for improved performance.

Type parameters

NameDescription
Tthe element type

Methods

fastNext

Returns the next iterator value asynchronously, or the given otherwise AsyncOptLazy value instead.

Definitions

fastNext(): MaybePromise<T | undefined>;

fastNext<O>(otherwise: AsyncOptLazy<O>): MaybePromise<T | O>;

next

Returns a promise resolving to the next IteratorResult.

Definition

next(): Promise<IteratorResult<T>>;