UNPKG

1.07 kBTypeScriptView Raw
1import { ArbitraryWithContextualShrink } from '../check/arbitrary/definition/ArbitraryWithContextualShrink';
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 * @remarks Since 1.9.0
17 * @public
18 */
19declare function bigUint(): ArbitraryWithContextualShrink<bigint>;
20/**
21 * For positive bigint between 0 (included) and max (included)
22 *
23 * @param max - Upper bound for the generated bigint
24 *
25 * @remarks Since 1.9.0
26 * @public
27 */
28declare function bigUint(max: bigint): ArbitraryWithContextualShrink<bigint>;
29/**
30 * For positive bigint between 0 (included) and max (included)
31 *
32 * @param constraints - Constraints to apply when building instances
33 *
34 * @remarks Since 2.6.0
35 * @public
36 */
37declare function bigUint(constraints: BigUintConstraints): ArbitraryWithContextualShrink<bigint>;
38export { bigUint };