typescript interface require one of two properties to exist
I'm trying to create an interface that could have
export interface MenuItem {
title: string;
component?: any;
click?: any;
icon: string;
}
- Is there a way to require
componentorclickto be set - Is there a way to require that both properties can't be set?