I am handling a response like this:
const response : {
a : string,
b : string
} | {
message : string
} = callFunc();
When using it in my code, I have:
response.message && doSomething(message);
However, TypeScript is showing an error that property "message" does not exist on the first type defined. How can I resolve this issue?