/** * Generates random integers or arrays of random integers within a specified range. * Every integer in the range is exactly equally likely (rejection sampling, no modulo bias). * * @example * randint(6) // integer in [0, 6) * randint(1, 7, 10) // ten dice rolls * * @param {number} low - The inclusive lower bound of the random integers. * @param {number} [high=null] - The exclusive upper bound. If not provided, `low` is treated as `high`, and the range is [0, low). * @param {number|Array|null} [size=null] - The shape of the output: * - If `null`, a single integer is returned. * - If a number, a 1D array of the specified size is returned. * - If an array (e.g., [m, n]), a multidimensional array of the specified shape is returned. * @throws {Error} If `low` is greater than or equal to `high`, bounds are not integers, or the range exceeds 2^53. * @returns {number|Array} A random integer, an array of random integers, or a multidimensional array. */ export function randint(low: number, high?: number, size?: number | any[] | null): number | any[];