/** * Deterministic randomness for generated fixtures. `Math.random` in a mock makes * a failing test unreproducible and a visual snapshot unstable; a seeded * generator gives varied-looking data that is identical on every run and on every * machine. */ export type SeededRng = { /** The next value in `[0, 1)`. */ next: () => number; /** * An integer in `[min, max]`, both inclusive. Bounds are trusted: `max` below * `min` returns a value outside either, unchecked. */ int: (min: number, max: number) => number; /** One element. Throws on an empty list. */ pick: (items: readonly T[]) => T; /** A shuffled copy; the input is left alone. */ shuffle: (items: readonly T[]) => T[]; /** Rewinds to the seed. Pass this to `setupMocks({ onReset })`. */ reset: () => void; }; /** * A mulberry32 generator — 32 bits of state, a handful of integer ops, no * dependency. Its statistical quality is irrelevant here; reproducibility and * being cheap enough to call inside a request handler are the requirements. */ export declare function createSeededRng(seed: number): SeededRng;