Skip to main content

Function: map()

map<K, V>(keyArb, valueArb, constraints?): Arbitrary<Map<K, V>>

Defined in: packages/fast-check/src/arbitrary/map.ts:57

For Maps with keys produced by keyArb and values from valueArb

Type Parameters

Type Parameter
K
V

Parameters

ParameterTypeDescription
keyArbArbitrary<K>Arbitrary used to generate the keys of the Map
valueArbArbitrary<V>Arbitrary used to generate the values of the Map
constraintsMapConstraintsConstraints to apply when building instances

Returns

Arbitrary<Map<K, V>>

Remarks

Since 4.4.0