(source, target, sourceIsPrimitive, reportErrors, intersectionState)
| 66795 | return related; |
| 66796 | } |
| 66797 | function indexSignaturesRelatedTo(source, target, sourceIsPrimitive, reportErrors, intersectionState) { |
| 66798 | if (relation === identityRelation) { |
| 66799 | return indexSignaturesIdenticalTo(source, target); |
| 66800 | } |
| 66801 | var indexInfos = getIndexInfosOfType(target); |
| 66802 | var targetHasStringIndex = ts.some(indexInfos, function (info) { return info.keyType === stringType; }); |
| 66803 | var result = -1 /* Ternary.True */; |
| 66804 | for (var _i = 0, indexInfos_5 = indexInfos; _i < indexInfos_5.length; _i++) { |
| 66805 | var targetInfo = indexInfos_5[_i]; |
| 66806 | var related = !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* TypeFlags.Any */ ? -1 /* Ternary.True */ : |
| 66807 | isGenericMappedType(source) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source), targetInfo.type, 3 /* RecursionFlags.Both */, reportErrors) : |
| 66808 | typeRelatedToIndexInfo(source, targetInfo, reportErrors, intersectionState); |
| 66809 | if (!related) { |
| 66810 | return 0 /* Ternary.False */; |
| 66811 | } |
| 66812 | result &= related; |
| 66813 | } |
| 66814 | return result; |
| 66815 | } |
| 66816 | function typeRelatedToIndexInfo(source, targetInfo, reportErrors, intersectionState) { |
| 66817 | var sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType); |
| 66818 | if (sourceInfo) { |
no test coverage detected
searching dependent graphs…