I used to use Flow for typing. How can I type an imprecise object?
Here's the array I'm working with:
const arr = [
{label: 'Set', value: setNumber, id: 'setNumber', set: setSetNumber, type: 'text'},
{label: 'Name', value: name, id: 'name', set: setName, type: 'text'},
{label: 'Source', value: source, id: 'source', set: setSource, type: 'text'}
]
The type inference works well except that I want 'type' to be:
type InputType = 'text' | 'number'
How can I define this one property without affecting the inference of the other properties?