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

Function callsAt

__tests__/cpp-element-access-calls.test.ts:48–54  ·  view source on GitHub ↗

`calls` callees of a function or method, as `qualifiedName:startLine`, which tells overloads apart.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

46
47/** `calls` callees of a function or method, as `qualifiedName:startLine`, which tells overloads apart. */
48function callsAt(cg: CodeGraph, caller: string): string[] {
49 return cg
50 .getCallees(callable(cg, caller).id)
51 .filter((r) => r.edge.kind === 'calls')
52 .map((r) => `${r.node.qualifiedName}:${r.node.startLine}`)
53 .sort();
54}
55
56const lines = (...l: string[]): string => [...l, ''].join('\n');
57

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected