I have an array something like this:
[
{
id: "type_a",
// A specific data structure for type_a here
},
{
id: "type_b",
// A specific data structure for type_b here
},
// ...etc
]
The order of the objects in the array is not defined and they can appear in any order.
How would I create a type in typescript to represent this structure?
So that the contents of the array only contains the defined types