Interface AsyncGenerator<T, TReturn, TNext>

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

Type Parameters

  • T = unknown
  • TReturn = any
  • TNext = unknown

Hierarchy (view full)

Methods