Skip to content

Commit 056c87f

Browse files
committed
Ignore constraints of generic mapped types in definitelyAssignableRelation
1 parent 93c76cb commit 056c87f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11778,6 +11778,9 @@ namespace ts {
1177811778
}
1177911779
return Ternary.False;
1178011780
}
11781+
if (relation === definitelyAssignableRelation && isGenericMappedType(source)) {
11782+
return Ternary.False;
11783+
}
1178111784
const sourceIsPrimitive = !!(source.flags & TypeFlags.Primitive);
1178211785
if (relation !== identityRelation) {
1178311786
source = getApparentType(source);

0 commit comments

Comments
 (0)