Interface Generator<T, TReturn, TNext>
interface Generator<T, TReturn, TNext> {
[iterator](): Generator<T, TReturn, TNext>;
next(...__namedParameters: [] | [TNext]): IteratorResult<T, TReturn>;
return(value: TReturn): IteratorResult<T, TReturn>;
throw(e: any): IteratorResult<T, TReturn>;
}
[iterator](): Generator<T, TReturn, TNext>;
next(...__namedParameters: [] | [TNext]): IteratorResult<T, TReturn>;
return(value: TReturn): IteratorResult<T, TReturn>;
throw(e: any): IteratorResult<T, TReturn>;
}
Type Parameters
Hierarchy
- IteratorObject<T, TReturn, TNext>
- Generator (view full)
Index
Methods
Methods
[iterator]
next
- next(...__namedParameters): IteratorResult<T, TReturn>
Parameters
Rest
...__namedParameters: [] | [TNext]
Returns IteratorResult<T, TReturn>
return
- return(value): IteratorResult<T, TReturn>
Parameters
- value: TReturn
Returns IteratorResult<T, TReturn>
throw
- throw(e): IteratorResult<T, TReturn>
Parameters
- e: any
Returns IteratorResult<T, TReturn>
Describes an Iterator produced by the runtime that inherits from the intrinsic
Iterator.prototype
.