The function or method `qualifiedName`, the one in `file` when given.
(cg: CodeGraph, qualifiedName: string, file?: string)
| 38 | |
| 39 | /** The function or method `qualifiedName`, the one in `file` when given. */ |
| 40 | function callable(cg: CodeGraph, qualifiedName: string, file?: string): Node { |
| 41 | const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find( |
| 42 | (n) => n.qualifiedName === qualifiedName && (file === undefined || n.filePath === file), |
| 43 | ); |
| 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, file?: string): string[] { |
no test coverage detected