What a function's or method's calls reach, as `qualifiedName resolvedBy@confidence`.
(cg: CodeGraph, qualifiedName: string)
| 33 | |
| 34 | /** What a function's or method's calls reach, as `qualifiedName resolvedBy@confidence`. */ |
| 35 | function calls(cg: CodeGraph, qualifiedName: string): string[] { |
| 36 | const from = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName)!; |
| 37 | return cg.getOutgoingEdgesFrom([from.id], ['calls']) |
| 38 | .map((e) => { |
| 39 | const meta = e.metadata as { confidence?: number; resolvedBy?: string } | undefined; |
| 40 | return `${cg.getNode(e.target)?.qualifiedName} ${meta?.resolvedBy}@${meta?.confidence}`; |
| 41 | }) |
| 42 | .sort(); |
| 43 | } |
| 44 | |
| 45 | const TABLES = lines( |
| 46 | '#include <memory>', |
no test coverage detected