Unused types
What an unused-type finding of fallow dead-code means, why it matters and how to fix it.
What it reports
Type export is never imported.
Dead code explains how fallow finds it.
Why it matters
Type-only exports (interfaces, type aliases, enums used only as types) that are never imported. These do not generate runtime code but add maintenance burden.
Example
export interface LegacyProps is exported, but no module imports the type.
Fix
Remove the type export, inline it, or keep it behind an explicit API entry point when consumers rely on it. With effect.schemaExportsAsTypes, this rule also reports unused Effect schema exports.
Facts
| Fact | Value |
|---|---|
| Issue type | unused-type |
| Rule id in SARIF output | fallow/unused-type |
| Command | fallow dead-code |
| Default severity | error |
Config key in rules | unused-types |
| Filter option | --unused-types |
| Suppression comment | // fallow-ignore-next-line unused-type |
Fixable with fallow fix | No |
| Opt-in | No |
When to keep the code
- A type that a package publishes for its users: put a
/** @public */JSDoc tag on it, or add the entry file of the package toentry.