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