TypeScript `|` Combinator
I have the following code:
And, TypeScript is giving me the following error:
I thought that
And, TypeScript is giving me the following error:
I thought that
let pet: Cat | Dog means I can assign either a Cat or Dog to it. Is that not right?