What about using a single required input whose model is typed in a way to make a sub-property required based on the other property's value?
Something like:
interface InputBase {
fruitType: 'apple' | 'banana';
fruitColor?: string; // notice that this is optionnal in the base interface
}
interface InputApple extends InputBase {
fruitType: 'apple';
fruitColor: string; // notice that this is now required if fruitType value is 'apple'
}
interface InputBanana extends InputBase {
}
export type InputType = InputBanana | InputApple; // this is the type you use
That way, your input would, through TypeScript validation, make sure that some property is required only if another value is x.