MCPcopy Index your code
hub / github.com/nodejs/node / typeRelatedToIndexInfo

Function typeRelatedToIndexInfo

test/fixtures/snapshot/typescript.js:66816–66829  ·  view source on GitHub ↗
(source, targetInfo, reportErrors, intersectionState)

Source from the content-addressed store, hash-verified

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);

Callers 1

indexSignaturesRelatedToFunction · 0.85

Calls 6

getApplicableIndexInfoFunction · 0.85
indexInfoRelatedToFunction · 0.85
reportErrorFunction · 0.85
typeToStringFunction · 0.85

Tested by

no test coverage detected