iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
16 lines • 692 B
TypeScript
import type { Tuple } from '../types';
/** Returns all successive `size` length permutations of the input `iterator`. */
export declare class PermutationsIterator<T, Size extends number> implements IterableIterator<Tuple<T, Size>> {
protected pool: T[];
/** Tuple size. */
protected size: Size;
protected indices: number[];
protected cycles: number[];
protected started: boolean;
constructor(iterator: Iterator<T>, size?: Size);
protected get value(): Tuple<T, Size>;
[Symbol.iterator](): IterableIterator<Tuple<T, Size>>;
next(): IteratorResult<Tuple<T, Size>>;
}
export default PermutationsIterator;
//# sourceMappingURL=PermutationsIterator.d.ts.map