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