record
record<
T,K>(keyValue,context):Dependent<Record<string,T>>
It returns an arbitrary that generates a dictionary (string key) value.
Example
random(dict())// => {"&o(l%": ""}Type Parameters
• T
• K extends PropertyKey
Parameters
keyValue
The arbitraries to use for key/value.
Arbitrary<T> | [Arbitrary<K>, Arbitrary<T>]
context
MaybePartial<RecordGenerator> = {}
Returns
Dependent<Record<string, T>>
A dictionary arbitrary.