typescript interface require one of two properties to exist
08:43 09 Nov 2016

I'm trying to create an interface that could have

export interface MenuItem {
  title: string;
  component?: any;
  click?: any;
  icon: string;
}
  1. Is there a way to require component or click to be set
  2. Is there a way to require that both properties can't be set?
typescript