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

Function callTargets

__tests__/sync-module-config-change.test.ts:76–82  ·  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

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

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected