`caller -> file:qualifiedName` for every `calls` edge out of `file`.
(graph: CodeGraph, file: string)
| 41 | |
| 42 | /** `caller -> file:qualifiedName` for every `calls` edge out of `file`. */ |
| 43 | function callsFrom(graph: CodeGraph, file: string): string[] { |
| 44 | const out: string[] = []; |
| 45 | for (const node of graph.getNodesInFile(file)) { |
| 46 | for (const e of graph.getOutgoingEdges(node.id)) { |
| 47 | if (e.kind !== 'calls') continue; |
| 48 | const target = graph.getNode(e.target)!; |
| 49 | out.push(`${node.name} -> ${target.filePath}:${target.qualifiedName}`); |
| 50 | } |
| 51 | } |
| 52 | return out.sort(); |
| 53 | } |
| 54 | |
| 55 | const DECOY = 'export class Decoy { missing() { return 42; } render() { return 1; } create() { return 2; } }\n'; |
| 56 |
no test coverage detected