Function: dictionary()
Call Signature
dictionary<
T>(keyArb,valueArb,constraints?):Arbitrary<Record<string,T>>
Defined in: packages/fast-check/src/arbitrary/dictionary.ts:67
For dictionaries with keys produced by keyArb and values from valueArb
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
keyArb | Arbitrary<string> | Arbitrary used to generate the keys of the object |
valueArb | Arbitrary<T> | Arbitrary used to generate the values of the object |
constraints? | DictionaryConstraints | - |
Returns
Arbitrary<Record<string, T>>
Remarks
Since 1.0.0
Call Signature
dictionary<
K,V>(keyArb,valueArb,constraints?):Arbitrary<Record<K,V>>
Defined in: packages/fast-check/src/arbitrary/dictionary.ts:81
For dictionaries with keys produced by keyArb and values from valueArb
Type Parameters
| Type Parameter |
|---|
K extends PropertyKey |
V |
Parameters
| Parameter | Type | Description |
|---|---|---|
keyArb | Arbitrary<K> | Arbitrary used to generate the keys of the object |
valueArb | Arbitrary<V> | Arbitrary used to generate the values of the object |
constraints? | DictionaryConstraints | - |
Returns
Arbitrary<Record<K, V>>
Remarks
Since 4.4.0