Ignore constraints of generic mapped types in definitelyAssignableRelation

This commit is contained in:
Anders Hejlsberg 2018-08-22 07:08:35 -07:00
parent 93c76cb617
commit 056c87f289

View file

@ -11778,6 +11778,9 @@ namespace ts {
}
return Ternary.False;
}
if (relation === definitelyAssignableRelation && isGenericMappedType(source)) {
return Ternary.False;
}
const sourceIsPrimitive = !!(source.flags & TypeFlags.Primitive);
if (relation !== identityRelation) {
source = getApparentType(source);