UNPKG

415 BTypeScriptView Raw
1/**
2 * A mechanism to retrieve random int32 values
3 */
4export interface Engine {
5 next(): number;
6}
7/**
8 * A function to use an `Engine` to produce a value
9 */
10export declare type Distribution<T = number> = (engine: Engine) => T;
11/**
12 * A function to use an `Engine` to produce a string of a requested length
13 */
14export declare type StringDistribution = (engine: Engine, length: number) => string;