(source, target, relation)
| 64605 | return false; |
| 64606 | } |
| 64607 | function isTypeRelatedTo(source, target, relation) { |
| 64608 | if (isFreshLiteralType(source)) { |
| 64609 | source = source.regularType; |
| 64610 | } |
| 64611 | if (isFreshLiteralType(target)) { |
| 64612 | target = target.regularType; |
| 64613 | } |
| 64614 | if (source === target) { |
| 64615 | return true; |
| 64616 | } |
| 64617 | if (relation !== identityRelation) { |
| 64618 | if (relation === comparableRelation && !(target.flags & 131072 /* TypeFlags.Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { |
| 64619 | return true; |
| 64620 | } |
| 64621 | } |
| 64622 | else if (!((source.flags | target.flags) & (3145728 /* TypeFlags.UnionOrIntersection */ | 8388608 /* TypeFlags.IndexedAccess */ | 16777216 /* TypeFlags.Conditional */ | 33554432 /* TypeFlags.Substitution */))) { |
| 64623 | // We have excluded types that may simplify to other forms, so types must have identical flags |
| 64624 | if (source.flags !== target.flags) |
| 64625 | return false; |
| 64626 | if (source.flags & 67358815 /* TypeFlags.Singleton */) |
| 64627 | return true; |
| 64628 | } |
| 64629 | if (source.flags & 524288 /* TypeFlags.Object */ && target.flags & 524288 /* TypeFlags.Object */) { |
| 64630 | var related = relation.get(getRelationKey(source, target, 0 /* IntersectionState.None */, relation, /*ignoreConstraints*/ false)); |
| 64631 | if (related !== undefined) { |
| 64632 | return !!(related & 1 /* RelationComparisonResult.Succeeded */); |
| 64633 | } |
| 64634 | } |
| 64635 | if (source.flags & 469499904 /* TypeFlags.StructuredOrInstantiable */ || target.flags & 469499904 /* TypeFlags.StructuredOrInstantiable */) { |
| 64636 | return checkTypeRelatedTo(source, target, relation, /*errorNode*/ undefined); |
| 64637 | } |
| 64638 | return false; |
| 64639 | } |
| 64640 | function isIgnoredJsxProperty(source, sourceProp) { |
| 64641 | return ts.getObjectFlags(source) & 2048 /* ObjectFlags.JsxAttributes */ && isHyphenatedJsxName(sourceProp.escapedName); |
| 64642 | } |
no test coverage detected
searching dependent graphs…