mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-16 06:59:15 -05:00
Component commits:6fe4be21e4Exclude arrays and tuples from full intersection property check9019e399e5Add regression test Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
This commit is contained in:
@@ -15827,7 +15827,7 @@ namespace ts {
|
||||
// recursive intersections that are structurally similar but not exactly identical. See #37854.
|
||||
if (result && !inPropertyCheck && (
|
||||
target.flags & TypeFlags.Intersection && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks) ||
|
||||
isNonGenericObjectType(target) && source.flags & TypeFlags.Intersection && getApparentType(source).flags & TypeFlags.StructuredType && !some((<IntersectionType>source).types, t => !!(getObjectFlags(t) & ObjectFlags.NonInferrableType)))) {
|
||||
isNonGenericObjectType(target) && !isArrayType(target) && !isTupleType(target) && source.flags & TypeFlags.Intersection && getApparentType(source).flags & TypeFlags.StructuredType && !some((<IntersectionType>source).types, t => !!(getObjectFlags(t) & ObjectFlags.NonInferrableType)))) {
|
||||
inPropertyCheck = true;
|
||||
result &= recursiveTypeRelatedTo(source, target, reportErrors, IntersectionState.PropertyCheck);
|
||||
inPropertyCheck = false;
|
||||
|
||||
Reference in New Issue
Block a user