How can I enforce, that a TypeScript Type require at least of one two properties?
I have a custom React Component which should either receive a
href or an
onClick event handler, depending if it should act as a link or a call-to-action button. One of those properties should definitely be set, so I want to enforce this via TypeScript. What would be the best solution for this?