Creates a Record<Key, Value> or your custom record. By default, record() will widen the keys (K) you specified in the value to form Record<Widen<K>, V>.
Record<Key, Value>
record()
K
value
Record<Widen<K>, V>
You can also override it by specifying a custom record, e.g.: record<{ a: number }>()
record<{ a: number }>()
Optional
Creates a
Record<Key, Value>
or your custom record. By default,record()
will widen the keys (K
) you specified in thevalue
to formRecord<Widen<K>, V>
.You can also override it by specifying a custom record, e.g.:
record<{ a: number }>()