Interface AsyncIterableIterator<T, TReturn, TNext>
interface AsyncIterableIterator<T, TReturn, TNext> {
[asyncIterator](): 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>;
next(...__namedParameters: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
}
Type Parameters
Hierarchy
- AsyncIterator<T, TReturn, TNext>
- AsyncIterableIterator (view full)
Index
Methods
Methods
[asyncIterator]
- [async
Iterator] (): AsyncIterableIterator<T, TReturn, TNext> Returns AsyncIterableIterator<T, TReturn, TNext>
next
- next(...__namedParameters): Promise<IteratorResult<T, TReturn>>
Parameters
Rest
...__namedParameters: [] | [TNext]
Returns Promise<IteratorResult<T, TReturn>>
Optional
return
- return(value?): Promise<IteratorResult<T, TReturn>>
Parameters
Optional
value: TReturn | PromiseLike<TReturn>
Returns Promise<IteratorResult<T, TReturn>>
Optional
throw
- throw(e?): Promise<IteratorResult<T, TReturn>>
Parameters
Optional
e: any
Returns Promise<IteratorResult<T, TReturn>>
Describes a user-defined AsyncIterator that is also async iterable.