Why in the following code is Exclude<A,B> resolving to the never type? Can't the typescript compiler know (through static analysis) that A and B extend Parent and thus Exclude<Choices, Parent> should resolve to type C?
interface Parent {}
interface A extends Parent {}
interface B extends Parent {}
interface C {}
type Choices = A | B | C
type Test = Exclude<Choices, Parent> // = type "never"???
const c: C = {}
const d: Test = c // Type 'C' is not assignable to type 'never'
I could hard code Parent = A | B but I'm unsure why I need to.