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

Function indexSignaturesIdenticalTo

test/fixtures/snapshot/typescript.js:66830–66844  ·  view source on GitHub ↗
(source, target)

Source from the content-addressed store, hash-verified

66828 return 0 /* Ternary.False */;
66829 }
66830 function indexSignaturesIdenticalTo(source, target) {
66831 var sourceInfos = getIndexInfosOfType(source);
66832 var targetInfos = getIndexInfosOfType(target);
66833 if (sourceInfos.length !== targetInfos.length) {
66834 return 0 /* Ternary.False */;
66835 }
66836 for (var _i = 0, targetInfos_1 = targetInfos; _i < targetInfos_1.length; _i++) {
66837 var targetInfo = targetInfos_1[_i];
66838 var sourceInfo = getIndexInfoOfType(source, targetInfo.keyType);
66839 if (!(sourceInfo && isRelatedTo(sourceInfo.type, targetInfo.type, 3 /* RecursionFlags.Both */) && sourceInfo.isReadonly === targetInfo.isReadonly)) {
66840 return 0 /* Ternary.False */;
66841 }
66842 }
66843 return -1 /* Ternary.True */;
66844 }
66845 function constructorVisibilitiesAreCompatible(sourceSignature, targetSignature, reportErrors) {
66846 if (!sourceSignature.declaration || !targetSignature.declaration) {
66847 return true;

Callers 1

indexSignaturesRelatedToFunction · 0.85

Calls 3

getIndexInfosOfTypeFunction · 0.85
getIndexInfoOfTypeFunction · 0.85
isRelatedToFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…