https://flow.org/en/docs/types/utilities/#toc-objmap
From Flow's docs:
ObjMap<T, F> takes an object type T, and a function type F, and returns the object type obtained by mapping the type of each value in the object with the provided function type F. In other words, $ObjMap will call (at the type level) the given function type F for every property value type in T, and return the resulting object type from those calls.
We could probably implement this if/once #6606 is implemented:
type ObjMap<T extends object, F extends Function> = {
[K in T]: typeof F(T[K])
}
Tracking this in a separate issue in case someone searches for TypeScript's equivalent of $ObjMap. Feel free to close this and fold into 6606 if you prefer!
https://flow.org/en/docs/types/utilities/#toc-objmap
From Flow's docs:
We could probably implement this if/once #6606 is implemented:
Tracking this in a separate issue in case someone searches for TypeScript's equivalent of
$ObjMap. Feel free to close this and fold into 6606 if you prefer!