What we want to express here is an object with a map of properties (name to type):
string Type map
For the OOP minded: Map<string, Type>
And also compose those: type Foo = { "_foo", int }
type Bar = { "_bar", string }
type FooBar = mergeMaps Foo Bar
But at compile-time, of course.Have any languages achieved this? I know TypeScript can do some of these things, but it's clunky.