const fn = (condition: boolean) => condition ? {a: ""} : {b: ""}
I have trouble with understanding why return type of fn is:
{
a: string;
b?: undefined;
} | {
b: string;
a?: undefined;
}
but not
{
a: string;
} | {
b: string;
}