UNPKG

1 kBTypeScriptView 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 domain}
5 * @remarks Since 2.22.0
6 * @public
7 */
8export interface DomainConstraints {
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 domains
17 * having an extension with at least two lowercase characters
18 *
19 * According to {@link https://www.ietf.org/rfc/rfc1034.txt | RFC 1034},
20 * {@link https://www.ietf.org/rfc/rfc1035.txt | RFC 1035},
21 * {@link https://www.ietf.org/rfc/rfc1123.txt | RFC 1123} and
22 * {@link https://url.spec.whatwg.org/ | WHATWG URL Standard}
23 *
24 * @param constraints - Constraints to apply when building instances (since 2.22.0)
25 *
26 * @remarks Since 1.14.0
27 * @public
28 */
29export declare function domain(constraints?: DomainConstraints): Arbitrary<string>;