The `calls` edges out of the function or method with this qualified name, as `name@file`.
(qualified: string)
| 36 | |
| 37 | /** The `calls` edges out of the function or method with this qualified name, as `name@file`. */ |
| 38 | function callees(qualified: string): string[] { |
| 39 | const from = [...cg!.getNodesByKind('function'), ...cg!.getNodesByKind('method')].filter((n) => n.qualifiedName === qualified); |
| 40 | expect(from.length, `${qualified} should be indexed`).toBe(1); |
| 41 | return cg! |
| 42 | .getOutgoingEdges(from[0]!.id) |
| 43 | .filter((e) => e.kind === 'calls') |
| 44 | .map((e) => cg!.getNode(e.target)) |
| 45 | .filter((n): n is NonNullable<typeof n> => !!n) |
| 46 | .map((n) => `${n.qualifiedName}@${n.filePath}`) |
| 47 | .sort(); |
| 48 | } |
| 49 | |
| 50 | describe("a local binding shadows the same file's module function (#3037)", () => { |
| 51 | it("the issue's repro, and the assignment, parameter and loop forms", async () => { |
no test coverage detected