Skip to main content Link Search Menu Expand Document (external link)

Arbitrary.ts overview

Since v3.10.0


Exports Grouped by Category


annotations

ArbitraryAnnotation (type alias)

Signature

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

Source

Since v3.10.0

ArbitraryGenerationContext (interface)

Signature

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

Source

Since v3.10.0

arbitrary

make

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

Signature

declare const make: <A, I, R>(schema: Schema.Schema<A, I, R>) => FastCheck.Arbitrary<A>

Source

Since v3.10.0

makeLazy

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

Signature

declare const makeLazy: <A, I, R>(schema: Schema.Schema<A, I, R>) => LazyArbitrary<A>

Source

Since v3.10.0

model

LazyArbitrary (interface)

Signature

export interface LazyArbitrary<A> {
  (fc: typeof FastCheck): FastCheck.Arbitrary<A>
}

Source

Since v3.10.0