What a function's or method's calls reach, as `qualifiedName @confidence`.
(cg: CodeGraph, qualifiedName: string)
| 32 | |
| 33 | /** What a function's or method's calls reach, as `qualifiedName @confidence`. */ |
| 34 | function callees(cg: CodeGraph, qualifiedName: string): string[] { |
| 35 | const from = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName)!; |
| 36 | return cg.getOutgoingEdgesFrom([from.id], ['calls']) |
| 37 | .map((e) => `${cg.getNode(e.target)?.qualifiedName} @${(e.metadata as { confidence?: number } | undefined)?.confidence}`) |
| 38 | .sort(); |
| 39 | } |
| 40 | |
| 41 | /** The same, with how each call was resolved. */ |
| 42 | function resolutions(cg: CodeGraph, qualifiedName: string): string[] { |
no test coverage detected