- objectMap<K extends string, V, NK extends string | number | symbol = K, NV = V>(
obj: Record<K, V>,
fn: (key: K, value: V) => undefined | [NK, NV],
): Record<NK, NV> 类型参数
- K extends string
- V
- NK extends string | number | symbol = K
- NV = V
参数
- obj: Record<K, V>
- fn: (key: K, value: V) => undefined | [NK, NV]
返回 Record<NK, NV>
Map key/value pairs for an object, and construct a new one