UNPKG

681 BTypeScriptView Raw
1/**
2 * The name of the patterns
3 */
4export type PatternName = "up" | "down" | "upDown" | "downUp" | "alternateUp" | "alternateDown" | "random" | "randomOnce" | "randomWalk";
5/**
6 * PatternGenerator returns a generator which will yield numbers between 0 and numValues
7 * according to the passed in pattern that can be used as indexes into an array of size numValues.
8 * @param numValues The size of the array to emit indexes for
9 * @param pattern The name of the pattern use when iterating over
10 * @param index Where to start in the offset of the values array
11 */
12export declare function PatternGenerator(numValues: number, pattern?: PatternName, index?: number): Iterator<number>;