Maps an object's values to a new type using a transformation function.
The type of the result is a Record where the keys are the same as the original object and the values are a union of all the possible types that the transformation function can return.
If you know the type of the object on anticipation, you can use the mapObjectWith function that will preserve the exact type for each value.
Maps an object's values to a new type using a transformation function.
The type of the result is a Record where the keys are the same as the original object and the values are a union of all the possible types that the transformation function can return.
If you know the type of the object on anticipation, you can use the
mapObjectWith
function that will preserve the exact type for each value.Example