TypeScript `|` Combinator
I have the following code:
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?1 Reply
Nevermind. I think it might be complaining about the
Resolver type within ResolverRegistry.
There were two different versions of the library included. I set a "resolutions" for the more recent version in my package.json & TS is now happy.