Skip to content

Commit c2f4d8a

Browse files
committed
Fix failing test
1 parent a78ce28 commit c2f4d8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17402,7 +17402,7 @@ namespace ts {
1740217402
}
1740317403
}
1740417404
}
17405-
else if (isGenericMappedType(target) && !target.declaration.nameType) {
17405+
else if (isGenericMappedType(target)) {
1740617406
// A source type T is related to a target type { [P in X]: T[P] }
1740717407
const template = getTemplateTypeFromMappedType(target);
1740817408
const modifiers = getMappedTypeModifiers(target);
@@ -17411,7 +17411,7 @@ namespace ts {
1741117411
(<IndexedAccessType>template).indexType === getTypeParameterFromMappedType(target)) {
1741217412
return Ternary.True;
1741317413
}
17414-
if (!isGenericMappedType(source)) {
17414+
if (!isGenericMappedType(source) && !target.declaration.nameType) {
1741517415
const targetConstraint = getConstraintTypeFromMappedType(target);
1741617416
const sourceKeys = getIndexType(source, /*stringsOnly*/ undefined, /*noIndexSignatures*/ true);
1741717417
const includeOptional = modifiers & MappedTypeModifiers.IncludeOptional;

0 commit comments

Comments
 (0)