Imagine function Object.map, something like Js.Dict.map, but remembers which properties object has.
Example:
let res = map(string_of_int, { "x": 1, "y": 2 });
/* res : {. "x" : string, "y" : string } */
Is it possible to encode something like that in a type system?
Another one: Object.assign, which merges properties of all arguments.
let res = assign({ "x" : 1 }, { "y" : 2 });
/* res : {. "x" : int, "y" : int } */