iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
16 lines • 707 B
TypeScript
import type { Tuple } from '../types';
/** Creates `size` length subsequences from the input `iterator`. */
export declare class CombinationsIterator<T, Size extends number> implements IterableIterator<Tuple<T, Size>> {
protected size: Size;
protected withReplacement: boolean;
protected pool: T[];
protected indices: number[];
protected n: number;
protected i: number;
constructor(iterator: Iterator<T>, size: Size, withReplacement: boolean);
protected get value(): Tuple<T, Size>;
[Symbol.iterator](): IterableIterator<Tuple<T, Size>>;
next(): IteratorResult<Tuple<T, Size>>;
}
export default CombinationsIterator;
//# sourceMappingURL=CombinationsIterator.d.ts.map