The same, with how each call was resolved.
(cg: CodeGraph, qualifiedName: string)
| 40 | |
| 41 | /** The same, with how each call was resolved. */ |
| 42 | function resolutions(cg: CodeGraph, qualifiedName: string): string[] { |
| 43 | const from = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName)!; |
| 44 | return cg.getOutgoingEdgesFrom([from.id], ['calls']) |
| 45 | .map((e) => { |
| 46 | const meta = e.metadata as { confidence?: number; resolvedBy?: string } | undefined; |
| 47 | return `${cg.getNode(e.target)?.qualifiedName} @${meta?.confidence} ${meta?.resolvedBy}`; |
| 48 | }) |
| 49 | .sort(); |
| 50 | } |
| 51 | |
| 52 | const SHAPES = lines( |
| 53 | 'class Widget {', |
no test coverage detected