docs: say what findDeadCode returns, and where the list worth acting on is (CG-59)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Colby McHenry
2026-08-27 07:57:25 -05:00
co-authored by Claude Opus 5
parent 56dfdb0655
commit 55a33055ee
+11 -1
View File
@@ -2041,7 +2041,17 @@ export class CodeGraph {
}
/**
* Find dead code (unreferenced symbols)
* Find unreferenced symbols — the RAW candidate set.
*
* Non-exported symbols of the given kinds with no incoming edge but
* `contains`. That is a fact, not a claim: on this engine's own index it
* returns ~2 500 symbols, of which about 20 are actually unreachable. The
* rest are overrides, framework registrations, mis-resolved twins and
* references the extractor never recorded.
*
* For a list anybody should act on, use `buildDeadCodeReport` from
* `src/graph/dead-code.ts`, which applies the exclusions and counts every one
* of them. This method is kept as-is because it is a published API.
*
* @param kinds - Node kinds to check (default: functions, methods, classes)
* @returns Array of unreferenced nodes