UNPKG

909 BTypeScriptView Raw
1import type { Arbitrary } from '../check/arbitrary/definition/Arbitrary.js';
2import type { SizeForArbitrary } from './_internals/helpers/MaxLengthFromMinLength.js';
3/**
4 * Constraints to be applied on {@link webSegment}
5 * @remarks Since 2.22.0
6 * @public
7 */
8export interface WebSegmentConstraints {
9 /**
10 * Define how large the generated values should be (at max)
11 * @remarks Since 2.22.0
12 */
13 size?: Exclude<SizeForArbitrary, 'max'>;
14}
15/**
16 * For internal segment of an URI (web included)
17 *
18 * According to {@link https://www.ietf.org/rfc/rfc3986.txt | RFC 3986}
19 *
20 * eg.: In the url `https://github.com/dubzzz/fast-check/`, `dubzzz` and `fast-check` are segments
21 *
22 * @param constraints - Constraints to apply when building instances (since 2.22.0)
23 *
24 * @remarks Since 1.14.0
25 * @public
26 */
27export declare function webSegment(constraints?: WebSegmentConstraints): Arbitrary<string>;