import { Subtract } from "../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/subtract.mjs"; import { RandomInteger } from "../node_modules/.pnpm/remeda@2.39.0_patch_hash_e9e98c19bf4c5844450bf78de4493bf242de2fdb7c7ecf7ee2313945578d9b68/node_modules/remeda/dist/index.mjs"; //#region src/math/random-int-exclusive.d.ts /** * Returns a pseudo-random integer in the **exclusive** range `[minimum, maximum)`. * Called with a single argument the range is `[0, maximum)` — the form used for * random array indexing (`array[randomIntExclusive(array.length)]`). When both * bounds are small numeric literals the return type narrows to the precise literal * union of possible results; otherwise `number`. * * The upper bound is excluded, matching array indexing and the `nextInt(n)` * convention of Java/Go/Ruby. For an inclusive upper bound use `randomIntInclusive`. * Internally the exclusive `[a, b)` integer range is the inclusive `[a, b - 1]` * range (uses `Math.random`; not cryptographically secure). The range must be * non-empty (`maximum` greater than * `minimum`, or `maximum` greater than `0` for the single-argument form). * @param minimum - The inclusive lower bound. When called with a single argument this slot is the exclusive upper bound instead and the lower bound defaults to `0`. * @param maximum - The exclusive upper bound. * @returns A random integer within the exclusive range. * @example * randomIntExclusive(1, 4); * // 1 | 2 | 3 (e.g. 2) * @example * // Single argument — range is [0, maximum); ideal for array indexing * randomIntExclusive(3); * // 0 | 1 | 2 (e.g. 1) */ declare function randomIntExclusive(minimum: Minimum, maximum: Maximum): RandomInteger>; declare function randomIntExclusive(maximum: Maximum): RandomInteger<0, Subtract>; //#endregion export { randomIntExclusive };