What the calls written in `from` (a function, or a file's own top level) reach, by qualified name.
(cg: CodeGraph, from: { file: string; name?: string })
| 35 | |
| 36 | /** What the calls written in `from` (a function, or a file's own top level) reach, by qualified name. */ |
| 37 | function calls(cg: CodeGraph, from: { file: string; name?: string }): string[] { |
| 38 | const sources = cg.getNodesInFile(from.file).filter((n) => (from.name ? n.name === from.name : n.kind === 'file')); |
| 39 | return sources |
| 40 | .flatMap((n) => cg.getOutgoingEdges(n.id)) |
| 41 | .filter((e) => e.kind === 'calls') |
| 42 | .map((e) => `${cg.getNode(e.target)!.filePath}::${cg.getNode(e.target)!.qualifiedName}`) |
| 43 | .sort(); |
| 44 | } |
| 45 | |
| 46 | describe('a very long chain of aliases', () => { |
| 47 | it('TypeScript: 20,000 aliases index, and a value typed by either end reaches the class', async () => { |
no test coverage detected