MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / passedBy

Method passedBy

src/resolution/parameter-flow.ts:322–333  ·  view source on GitHub ↗
(site: FlowSite)

Source from the content-addressed store, hash-verified

320 const here = [...path, `${method.id}\0${parameter.name}`];
321 let value: FlowValue | null = null;
322 const passedBy = (site: FlowSite): Abstention | null => {
323 const passed = this.adapter.argumentValue(site, parameter, (m, p) => {
324 if (here.includes(`${m.id}\0${p.name}`)) return CYCLE;
325 if (here.length >= MAX_FLOW_DEPTH) return TOO_DEEP;
326 return this.flow(m, p, here, through);
327 });
328 if (passed === CYCLE) return null;
329 if (!isFlowValue(passed)) return passed;
330 if (value && (value.type !== passed.type || value.isClass !== passed.isClass)) return DISAGREE;
331 value = passed;
332 return null;
333 };
334 // The calls of this very method first: most flows end at their first argument.
335 for (const site of this.callsInto(method)) {
336 if (!this.adapter.isKnown(site)) continue;

Callers

nothing calls this directly

Calls 3

flowMethod · 0.95
isFlowValueFunction · 0.85
argumentValueMethod · 0.80

Tested by

no test coverage detected