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

Function callTargets

__tests__/sync-module-config-change.test.ts:75–81  ·  view source on GitHub ↗

The files the calls written in `caller` land in.

(graph: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

73
74/** The files the calls written in `caller` land in. */
75function callTargets(graph: CodeGraph, caller: string): string[] {
76 const node = graph.getNodesByQualifiedName(caller)[0]!;
77 return graph.getOutgoingEdges(node.id)
78 .filter((e) => e.kind === 'calls')
79 .map((e) => `${graph.getNode(e.target)!.filePath}::${graph.getNode(e.target)!.qualifiedName}`)
80 .sort();
81}
82
83const tsconfig = (target: string): string =>
84 JSON.stringify({ compilerOptions: { baseUrl: '.', paths: { '@lib/*': [`${target}/*`] } } });

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected