mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Make the relationship between partial mapped types and the empty object not apply for subtype relationship (#29384)
This commit is contained in:
1 parent
b6ae492009
commit
addeff325b
5 files changed
+170
-1
No files matched your search
@@ -12677,7 +12677,7 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
// An empty object type is related to any mapped type that includes a '?' modifier.
|
||||
if (isPartialMappedType(target) && isEmptyObjectType(source)) {
|
||||
if (relation !== subtypeRelation && isPartialMappedType(target) && isEmptyObjectType(source)) {
|
||||
return Ternary.True;
|
||||
}
|
||||
if (isGenericMappedType(target)) {
|
||||
|
||||
Reference in new issue
Block a user