UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

15 lines 532 B
/** * @deprecated Use `SeekableIterator` instead. * @description Caches the values of the input `iterator` into a Map. */ export declare class CachedIterator<T> implements IterableIterator<T> { protected iterator: Iterator<T>; readonly cache: Map<number, T>; protected i: number; protected done: boolean; constructor(iterator: Iterator<T>); [Symbol.iterator](): IterableIterator<T>; next(...args: any[]): IteratorResult<T>; } export default CachedIterator; //# sourceMappingURL=CachedIterator.d.ts.map