--type-aware when a cleanup or refactor
depends on exact TypeScript symbol identity across aliases, re-exports,
packages, or tests.
The optional companion adds five project-wide capabilities:
- exact symbol-use confirmation for existing dead-code candidates
- symbol traces with namespaces, aliases, and re-export hops
- package API surfaces and cross-file private type leaks
- exact consumers, affected files, and targeted tests
- advisory public-signature type coupling
What this does not replace
Keeptsc --noEmit responsible for compiler correctness. Keep Oxlint
responsible for local lint rules. Fallow does not emit TypeScript diagnostics
or duplicate local typed lint findings.
Type-aware fallow answers project-wide questions those tools do not:
- Is this exact declaration used through an alias or re-export?
- Which production files and tests depend on this exported symbol?
- Does a public signature expose a package-private type?
- Which public types couple packages or modules together?
Conservative results
Every semantic result reportscomplete, partial, or unavailable.
Fallow removes a dead-code candidate only when the checker resolves its exact
declaration identity. Partial or unavailable analysis keeps the original
finding and reports a stable omission reason.
fallow fix --type-aware offers a class-member removal only after every owning
project returns complete negative evidence and the declaration guard still
matches. Always preview with --dry-run.
Use --type-aware-require complete in CI when incomplete semantic evidence
must fail the job:
--type-aware-project flags when automatic project selection
does not include every consumer:
Persistent configuration
Keep the feature opt-in per repository:best-effort. Use complete only when partial or unavailable
semantic evidence must fail the run.
Performance
Type-aware analysis constructs an additional TypeScript Program and scans checker symbols. On the current public release corpus, marginal overhead is about 92 ms at the median and 2.3 seconds at P95. Large projects can take longer. Editor sessions reuse the loaded Program, while one-shot CLI and CI runs pay the cold setup cost.Installation
Thefallow npm package installs a version-matched optional
fallow-type-aware companion. If optional dependencies are disabled, install
the exact same version manually. fallow type-aware status verifies discovery,
package version, protocol version, and backend version without analyzing the
project.
See also
Dead code CLI
Refine cleanup findings and run exact symbol queries.
Health CLI
Inspect advisory public-signature type coupling.
Known limitations
Understand the boundary between default syntactic and optional semantic analysis.