mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 02:15:12 -06:00
Mapped types assignable to objects with 'any' string index signature
This commit is contained in:
parent
0f78f53780
commit
82a2ee6440
@ -7730,8 +7730,11 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (relation !== identityRelation && isEmptyObjectType(resolveStructuredTypeMembers(<ObjectType>target))) {
|
||||
return Ternary.True;
|
||||
else if (relation !== identityRelation) {
|
||||
const resolved = resolveStructuredTypeMembers(<ObjectType>target);
|
||||
if (isEmptyObjectType(resolved) || resolved.stringIndexInfo && resolved.stringIndexInfo.type.flags & TypeFlags.Any) {
|
||||
return Ternary.True;
|
||||
}
|
||||
}
|
||||
return Ternary.False;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user