/** * Random helpers that accept an optional `random` parameter, * defaulting to `Math.random`. Pass a seeded PRNG for reproducible results: * * - `create_random_xoshiro` — fast, high-quality numeric seeding (recommended) * - `create_random_alea` — supports string and variadic seeds * * @module */ import type { ArrayElement } from './types.js'; /** * Generates a random `number` between `min` and `max`. */ export declare const random_float: (min: number, max: number, random?: () => number) => number; /** * Returns a random integer between `min` and `max` inclusive. * Node's `randomInt` is similar but exclusive of the max value, and makes `min` optional - * https://nodejs.org/docs/latest-v20.x/api/crypto.html#cryptorandomintmin-max-callback */ export declare const random_int: (min: number, max: number, random?: () => number) => number; /** * Generates a random `boolean`. */ export declare const random_boolean: (random?: () => number) => boolean; /** * Selects a random item from an array. */ export declare const random_item: >(arr: T, random?: () => number) => ArrayElement; /** * Mutates `array` with random ordering. * @mutates array - randomly reorders elements in place using Fisher-Yates shuffle */ export declare const shuffle: >(array: T, random?: typeof random_int) => T; //# sourceMappingURL=random.d.ts.map