Interface AsyncIterableIterator<T, TReturn, TNext>

Describes a user-defined AsyncIterator that is also async iterable.

interface AsyncIterableIterator<T, TReturn, TNext> {
    next(...__namedParameters: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
    return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
    throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
    [asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
}

Type Parameters

  • T
  • TReturn = any
  • TNext = any

Hierarchy (view full)

Methods