(g: CodeGraph, id: string, direction: 'in' | 'out')
| 66 | } |
| 67 | /** `qualifiedName@file` at the other end of a node's `calls` edges. */ |
| 68 | const calls = (g: CodeGraph, id: string, direction: 'in' | 'out') => |
| 69 | (direction === 'in' ? g.getIncomingEdges(id) : g.getOutgoingEdges(id)) |
| 70 | .filter((e) => e.kind === 'calls') |
| 71 | .map((e) => { const n = g.getNode(direction === 'in' ? e.source : e.target)!; return `${n.qualifiedName}@${n.filePath}`; }) |
| 72 | .sort(); |
| 73 | const callees = (g: CodeGraph, qn: string, file: string) => calls(g, node(g, qn, file).id, 'out'); |
| 74 | const callers = (g: CodeGraph, qn: string, file: string) => calls(g, node(g, qn, file).id, 'in'); |
| 75 |
no test coverage detected