`calls` callees of a function or method, constructors aside, as `qualifiedName`, one per callee.
(cg: CodeGraph, caller: string)
| 46 | |
| 47 | /** `calls` callees of a function or method, constructors aside, as `qualifiedName`, one per callee. */ |
| 48 | function calls(cg: CodeGraph, caller: string): string[] { |
| 49 | return cg |
| 50 | .getCallees(callable(cg, caller).id) |
| 51 | .filter((r) => r.edge.kind === 'calls') |
| 52 | .filter((r) => { |
| 53 | const [owner, name] = r.node.qualifiedName.split('::').slice(-2); |
| 54 | return owner !== name; |
| 55 | }) |
| 56 | .map((r) => r.node.qualifiedName) |
| 57 | .sort(); |
| 58 | } |
| 59 | |
| 60 | const lines = (...l: string[]): string => [...l, ''].join('\n'); |
| 61 |
no test coverage detected