- zipObject<T, K, U>(props?, values?): {
[P in U as T[P]]: K[P]
} Type Parameters
- T extends PropertyName[]
- K extends any[]
- U extends number = BuildIndexUnion<T["length"], []>
Parameters
Optional
props: TOptional
values: K
Returns {
[P in U as T[P]]: K[P]
}
Returns the new object.
This method is like
fromPairs
except that it accepts two arrays, one of property identifiers and one of corresponding values.