UNPKG

774 BTypeScriptView Raw
1import type { SizeForArbitrary } from '../_internals/helpers/MaxLengthFromMinLength.js';
2/**
3 * Constraints to be applied on arbitraries for strings
4 * @remarks Since 2.4.0
5 * @public
6 */
7export interface StringSharedConstraints {
8 /**
9 * Lower bound of the generated string length (included)
10 * @defaultValue 0
11 * @remarks Since 2.4.0
12 */
13 minLength?: number;
14 /**
15 * Upper bound of the generated string length (included)
16 * @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
17 * @remarks Since 2.4.0
18 */
19 maxLength?: number;
20 /**
21 * Define how large the generated values should be (at max)
22 * @remarks Since 2.22.0
23 */
24 size?: SizeForArbitrary;
25}