Is it possible to do the following in Typescript:
I have an object whose keys are properties and values are an array of the options for these properties:
const options = {
foo: [fooOption1, fooOption2, ...],
bar: [barOption1, barOption2, ...],
...
}
Is it possible to create an interface such that
interface example {
foo: fooOption1 | fooOption2 | ...,
bar: barOption1 | barOption2 | ...,
...
}