iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
14 lines • 665 B
TypeScript
import type { Tuple } from '../types';
/** An iterator that yields non-overlapping values in chunks (tuples) of a certain `size`. */
export declare class ChunksIterator<T, Size extends number> implements IterableIterator<Tuple<T, Size>> {
protected iterator: Iterator<T>;
protected length: Size;
protected fill?: T | undefined;
protected done: boolean;
protected chunk: T[];
constructor(iterator: Iterator<T>, length: Size, fill?: T | undefined);
[Symbol.iterator](): IterableIterator<Tuple<T, Size>>;
next(...args: any[]): IteratorResult<Tuple<T, Size>>;
}
export default ChunksIterator;
//# sourceMappingURL=ChunksIterator.d.ts.map