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

Function addMatch

test/fixtures/snapshot/typescript.js:68447–68454  ·  view source on GitHub ↗
(s, p)

Source from the content-addressed store, hash-verified

68445 return index < lastSourceIndex ? sourceTexts[index] : remainingEndText;
68446 }
68447 function addMatch(s, p) {
68448 var matchType = s === seg ?
68449 getStringLiteralType(getSourceText(s).slice(pos, p)) :
68450 getTemplateLiteralType(__spreadArray(__spreadArray([sourceTexts[seg].slice(pos)], sourceTexts.slice(seg + 1, s), true), [getSourceText(s).slice(0, p)], false), sourceTypes.slice(seg, s));
68451 matches.push(matchType);
68452 seg = s;
68453 pos = p;
68454 }
68455 }
68456 function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) {
68457 if (priority === void 0) { priority = 0; }

Calls 5

getStringLiteralTypeFunction · 0.85
getSourceTextFunction · 0.85
getTemplateLiteralTypeFunction · 0.85
sliceMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…