Can Typescript support the following scenario:
I have a structure where keys represent properties and values are arrays of options for those properties:
const options = {
foo: [fooOption1, fooOption2, ...],
bar: [barOption1, barOption2, ...],
...
}
Is there a way to define an interface that maps this structure like so:
interface example {
foo: fooOption1 | fooOption2 | ...,
bar: barOption1 | barOption2 | ...,
...
}