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