The function or method `qualifiedName`, the one in `file` when given.
(cg: CodeGraph, qualifiedName: string, file?: string)
| 37 | |
| 38 | /** The function or method `qualifiedName`, the one in `file` when given. */ |
| 39 | function callable(cg: CodeGraph, qualifiedName: string, file?: string): Node { |
| 40 | const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find( |
| 41 | (n) => n.qualifiedName === qualifiedName && (file === undefined || n.filePath === file), |
| 42 | ); |
| 43 | if (!node) throw new Error(`no function or method ${qualifiedName}`); |
| 44 | return node; |
| 45 | } |
| 46 | |
| 47 | /** `calls` callees of a function or method, as `qualifiedName [file] @confidence`. */ |
| 48 | function calls(cg: CodeGraph, caller: string, file?: string): string[] { |
no test coverage detected