Essentially, I'm faced with a situation where I need to handle a style object that must contain either the maxHeight or height properties. If one of these properties is included, the other becomes unnecessary. Despite my efforts, I have been unable to find a way to accomplish this using TypeScript. I attempted to tackle the problem in the following manner, but unfortunately, the solution did not work:
For example:
type Style = {
['maxHeight' | 'height': string]: string | number;
}
Thank you in advance for any assistance or guidance to relevant documentation!