OR interfaces?

What should EITHER mean?
interface ONE {
one: number;
i: string;
}
interface TWO {
two: number;
j: string;
}

type EITHER = ONE | TWO;
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.
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
dan.the.discloser
how would I say that I want it to be exactly one of the them (ie: to have exactly 2 elements in it)
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View