* What the function or method `name` refers to as a value: "target as * written", sorted. A call is not among them.
(cg: CodeGraph | undefined, name: string)
| 197 | * written", sorted. A call is not among them. |
| 198 | */ |
| 199 | function values(cg: CodeGraph | undefined, name: string): string[] { |
| 200 | const from = [...cg!.getNodesByKind('function'), ...cg!.getNodesByKind('method')].find((n) => n.name === name); |
| 201 | expect(from, name).toBeDefined(); |
| 202 | return cg! |
| 203 | .getOutgoingEdges(from!.id) |
| 204 | .filter((e) => e.kind === 'references') |
| 205 | .map((e) => `${cg!.getNode(e.target)!.qualifiedName} as ${String(e.metadata?.refName ?? '')}`) |
| 206 | .sort(); |
| 207 | } |
| 208 | |
| 209 | /** The functions `name` calls. */ |
| 210 | function calls(cg: CodeGraph | undefined, name: string): string[] { |
no test coverage detected