I am not sure, what to search for below requirement. I am using the below type for react props.
interface ComponentProps {
message : string,
minValue? : number,
minValueValidationMessage? :string
}
Now, I want to let the typescript know that, if minValue is specified then minValueValidationMessage should also be required.
if minValueValidationMessage is specified, then minValue should also be specified.
I have quite a few similar such combinations and can happen in any permutation and combination.