(cg: CodeGraph, qualifiedName: string)
| 34 | } |
| 35 | |
| 36 | function callable(cg: CodeGraph, qualifiedName: string): Node { |
| 37 | const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName); |
| 38 | if (!node) throw new Error(`no function or method ${qualifiedName}`); |
| 39 | return node; |
| 40 | } |
| 41 | |
| 42 | /** `calls` callees of a function or method, as `qualifiedName`. */ |
| 43 | function calls(cg: CodeGraph, caller: string): string[] { |