mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 20:44:53 -05:00
Properly make inferences from partial source type (#42038)
* Slightly less picky check in typesDefinitelyUnrelated * Accept new baselines * Add regression test
This commit is contained in:
@@ -20045,7 +20045,7 @@ namespace ts {
|
||||
// Two object types that each have a property that is unmatched in the other are definitely unrelated.
|
||||
return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) :
|
||||
!!getUnmatchedProperty(source, target, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ true) &&
|
||||
!!getUnmatchedProperty(target, source, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ true);
|
||||
!!getUnmatchedProperty(target, source, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false);
|
||||
}
|
||||
|
||||
function getTypeFromInference(inference: InferenceInfo) {
|
||||
|
||||
Reference in New Issue
Block a user