I am unfamiliar with TypeScript and I have an object named obj
with 3 properties: a, b, c. However, it is important to note that b and c cannot exist together in the same object. So, my object will either be:
obj = {
a: 'xxx',
b: 'xxx'
}
or
obj = {
a: 'xxx',
c: 'xxx'
}
How can I properly define the type of obj
in TypeScript?