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