mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
Exclude identity relation from mapped type relation check (#46632)
* Exclude identity relation from mapped type relation check * Add regression test
This commit is contained in:
@@ -19046,7 +19046,7 @@ namespace ts {
|
||||
originalErrorInfo = undefined;
|
||||
}
|
||||
}
|
||||
else if (isGenericMappedType(target)) {
|
||||
else if (isGenericMappedType(target) && relation !== identityRelation) {
|
||||
// Check if source type `S` is related to target type `{ [P in Q]: T }` or `{ [P in Q as R]: T}`.
|
||||
const keysRemapped = !!target.declaration.nameType;
|
||||
const templateType = getTemplateTypeFromMappedType(target);
|
||||
|
||||
Reference in New Issue
Block a user