Skip to main content

Function: set()

set<T>(arb, constraints?): Arbitrary<Set<T>>

Defined in: packages/fast-check/src/arbitrary/set.ts:58

For sets of values coming from arb

All the values in the set are unique. Comparison of values relies on SameValueZero which is the same comparison algorithm used by Set.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
arbArbitrary<T>Arbitrary used to generate the values inside the set
constraintsSetConstraintsConstraints to apply when building instances

Returns

Arbitrary<Set<T>>

Remarks

Since 4.4.0