dan.the.discloserD
Denoβ€’4y agoβ€’
5 replies
dan.the.discloser

OR interfaces?

What should EITHER mean?

interface ONE {
  one: number;
  i: string;
}
interface TWO {
  two: number;
  j: string;
}

type EITHER = ONE | TWO;


EITHER seems to accept anything that has

* ALL the elements of either ONE or TWO, along with
* zero or more elements of the other.
Was this page helpful?