* Files in the candidate set that nothing else in the index reaches. * * One batched query for the whole set (`getFileDependentCounts` counts through * the symbols, because an `imports` edge points at the imported symbol and a * file node almost never receives one). Zero means nothing else in th
(cg: CodeGraph, filePaths: readonly string[])
| 761 | * reaches into this file at all. |
| 762 | */ |
| 763 | function filesNothingReaches(cg: CodeGraph, filePaths: readonly string[]): Set<string> { |
| 764 | const unique = [...new Set(filePaths)]; |
| 765 | if (unique.length === 0) return new Set(); |
| 766 | const dependents = cg.getFileDependentCounts(unique); |
| 767 | return new Set(unique.filter((path) => (dependents.get(path) ?? 0) === 0)); |
| 768 | } |
| 769 | |
| 770 | /** A file whose contents are declarations for somebody else — see {@link HEADER_EXTENSIONS}. */ |
| 771 | export function isHeaderFile(filePath: string): boolean { |
no test coverage detected