What a file's symbols call, reference and instantiate: "from -kind-> to", sorted.
(name: string, file: string)
| 314 | |
| 315 | /** What a file's symbols call, reference and instantiate: "from -kind-> to", sorted. */ |
| 316 | function links(name: string, file: string): string[] { |
| 317 | const cg = graphs.get(name)!; |
| 318 | const out: string[] = []; |
| 319 | for (const from of cg.getNodesInFile(file)) { |
| 320 | if (from.kind === 'file' || from.kind === 'import') continue; |
| 321 | for (const edge of cg.getOutgoingEdges(from.id)) { |
| 322 | if (edge.kind === 'contains') continue; |
| 323 | out.push(`${from.qualifiedName} -${edge.kind}-> ${cg.getNode(edge.target)!.qualifiedName}`); |
| 324 | } |
| 325 | } |
| 326 | return [...new Set(out)].sort(); |
| 327 | } |
| 328 | |
| 329 | /** The language each named symbol of a file was read as. */ |
| 330 | function languages(name: string, file: string): Record<string, string> { |
no test coverage detected