(source, targetInfo, reportErrors, intersectionState)
| 66814 | return result; |
| 66815 | } |
| 66816 | function typeRelatedToIndexInfo(source, targetInfo, reportErrors, intersectionState) { |
| 66817 | var sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType); |
| 66818 | if (sourceInfo) { |
| 66819 | return indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors); |
| 66820 | } |
| 66821 | if (!(intersectionState & 1 /* IntersectionState.Source */) && isObjectTypeWithInferableIndex(source)) { |
| 66822 | // Intersection constituents are never considered to have an inferred index signature |
| 66823 | return membersRelatedToIndexInfo(source, targetInfo, reportErrors); |
| 66824 | } |
| 66825 | if (reportErrors) { |
| 66826 | reportError(ts.Diagnostics.Index_signature_for_type_0_is_missing_in_type_1, typeToString(targetInfo.keyType), typeToString(source)); |
| 66827 | } |
| 66828 | return 0 /* Ternary.False */; |
| 66829 | } |
| 66830 | function indexSignaturesIdenticalTo(source, target) { |
| 66831 | var sourceInfos = getIndexInfosOfType(source); |
| 66832 | var targetInfos = getIndexInfosOfType(target); |
no test coverage detected