Closed samhh closed 3 years ago
The type of B1
:
// What it is
const B1: ((x: Member<"A1", string>) => B) | ((x: Member<"A2", number>) => B)
// What it needs to be
const B1: (x: A) => B
The conditional type in Constructor
is distributing over the union B
. It can be solved by changing the condition from B extends undefined
to [B] extends [undefined]
, per this comment.