UNPKG

787 BTypeScriptView Raw
1import type { Arbitrary } from '../check/arbitrary/definition/Arbitrary.js';
2/**
3 * Constraints to be applied on {@link integer}
4 * @remarks Since 2.6.0
5 * @public
6 */
7export interface IntegerConstraints {
8 /**
9 * Lower bound for the generated integers (included)
10 * @defaultValue -0x80000000
11 * @remarks Since 2.6.0
12 */
13 min?: number;
14 /**
15 * Upper bound for the generated integers (included)
16 * @defaultValue 0x7fffffff
17 * @remarks Since 2.6.0
18 */
19 max?: number;
20}
21/**
22 * For integers between min (included) and max (included)
23 *
24 * @param constraints - Constraints to apply when building instances (since 2.6.0)
25 *
26 * @remarks Since 0.0.1
27 * @public
28 */
29export declare function integer(constraints?: IntegerConstraints): Arbitrary<number>;