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

Function inferFromMatchingTypes

test/fixtures/snapshot/typescript.js:68716–68734  ·  view source on GitHub ↗
(sources, targets, matches)

Source from the content-addressed store, hash-verified

68714 inferencePriority = Math.min(inferencePriority, saveInferencePriority);
68715 }
68716 function inferFromMatchingTypes(sources, targets, matches) {
68717 var matchedSources;
68718 var matchedTargets;
68719 for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) {
68720 var t = targets_1[_i];
68721 for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) {
68722 var s = sources_1[_a];
68723 if (matches(s, t)) {
68724 inferFromTypes(s, t);
68725 matchedSources = ts.appendIfUnique(matchedSources, s);
68726 matchedTargets = ts.appendIfUnique(matchedTargets, t);
68727 }
68728 }
68729 }
68730 return [
68731 matchedSources ? ts.filter(sources, function (t) { return !ts.contains(matchedSources, t); }) : sources,
68732 matchedTargets ? ts.filter(targets, function (t) { return !ts.contains(matchedTargets, t); }) : targets,
68733 ];
68734 }
68735 function inferFromTypeArguments(sourceTypes, targetTypes, variances) {
68736 var count = sourceTypes.length < targetTypes.length ? sourceTypes.length : targetTypes.length;
68737 for (var i = 0; i < count; i++) {

Callers 1

inferFromTypesFunction · 0.85

Calls 3

inferFromTypesFunction · 0.85
filterMethod · 0.65
containsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…