OR interfaces?
What should
EITHER
mean?
EITHER
seems to accept anything that has
* ALL the elements of either ONE
or TWO
, along with
* zero or more elements of the other.4 Replies
A union type like this means that it the type is actually atleast
One
or Two
which means that sometimes a combination of both is also allowed
If you want them to be exclusive then adding the same property with a different type can help
Like kind: "One"
and kind: "Two"
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
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•3y ago
Message Not Public
Sign In & Join Server To View