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