Using undefined
as a discriminator within a mapped type yields erroneous types when primitive intersections are involved
#14471
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
TypeScript Version: 2.2.0
Code
Expected behavior:
There are no type errors in the above, and
f
after thetypeof f === "number"
check is either a number orFieldId
.Actual behavior:
replacement = { ...ch, field: lookupName(f) };
has a type error andf
is of typenever
.The text was updated successfully, but these errors were encountered: