The methods the function `name` calls: `Owner::method (file:line) confidence`.
(graph: CodeGraph, name: string)
| 49 | |
| 50 | /** The methods the function `name` calls: `Owner::method (file:line) confidence`. */ |
| 51 | function methods(graph: CodeGraph, name: string): string[] { |
| 52 | const from = graph.getNodesByKind('function').find((n) => n.name === name); |
| 53 | expect(from, `${name} should be indexed`).toBeDefined(); |
| 54 | return graph.getOutgoingEdges(from!.id).filter((e) => e.kind === 'calls') |
| 55 | .map((e) => ({ e, t: graph.getNode(e.target)! })) |
| 56 | .filter(({ t }) => t.kind === 'method') |
| 57 | .map(({ e, t }) => `${t.qualifiedName} (${t.filePath}:${t.startLine}) ${e.metadata?.confidence}`) |
| 58 | .sort(); |
| 59 | } |
| 60 | |
| 61 | /** The issue's project. */ |
| 62 | const SCENE = 'export class Scene {\n mutateElement(id: number): number { return id; }\n onlyScene(): void {}\n}\n'; |
no test coverage detected