Interface Generator<T, TReturn, TNext>

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

Type Parameters

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

Hierarchy (view full)

Methods