UNPKG

1.23 kBTypeScriptView Raw
1import type { Arbitrary } from '../check/arbitrary/definition/Arbitrary.js';
2/**
3 * Constraints to be applied on {@link bigUint}
4 * @remarks Since 2.6.0
5 * @public
6 */
7export interface BigUintConstraints {
8 /**
9 * Upper bound for the generated bigints (eg.: 2147483647n, BigInt(Number.MAX_SAFE_INTEGER))
10 * @remarks Since 2.6.0
11 */
12 max?: bigint;
13}
14/**
15 * For positive bigint
16 * @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: 0n })` instead
17 * @remarks Since 1.9.0
18 * @public
19 */
20declare function bigUint(): Arbitrary<bigint>;
21/**
22 * For positive bigint between 0 (included) and max (included)
23 *
24 * @param max - Upper bound for the generated bigint
25 * @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: 0n, max })` instead
26 * @remarks Since 1.9.0
27 * @public
28 */
29declare function bigUint(max: bigint): Arbitrary<bigint>;
30/**
31 * For positive bigint between 0 (included) and max (included)
32 *
33 * @param constraints - Constraints to apply when building instances
34 *
35 * @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: 0n, max })` instead
36 * @remarks Since 2.6.0
37 * @public
38 */
39declare function bigUint(constraints: BigUintConstraints): Arbitrary<bigint>;
40export { bigUint };