Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

Arbitrary

5 exports Since v3.10.0 Source

Annotations

Signature

type ArbitraryAnnotation<A, TypeParameters extends ReadonlyArray<any> = readonly []> = (...arbitraries: [...{ [K in keyof TypeParameters]: LazyArbitrary<TypeParameters[K]> }, ctx: ArbitraryGenerationContext]) => LazyArbitrary<A>

Signature

interface ArbitraryGenerationContext {
readonly constraints?: StringConstraints | NumberConstraints | BigIntConstraints | DateConstraints | ArrayConstraints;
readonly depthIdentifier?: string;
readonly maxDepth: number;
}

Arbitrary

Since v3.10.0

Returns a fast-check Arbitrary for the A type of the provided schema.

Signature

declare function make<A, I, R>(schema: Schema<A, I, R>): Arbitrary<A>
Since v3.10.0

Returns a LazyArbitrary for the A type of the provided schema.

Signature

declare function makeLazy<A, I, R>(schema: Schema<A, I, R>): LazyArbitrary<A>

Model

LazyArbitrary

interface
Since v3.10.0

Signature

interface LazyArbitrary<A> {
(fc: __module): Arbitrary<A>;
}