Skip to content
Fallow home
All docs pages

Docs home

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

FactValue
Issue typeunused-type
Rule id in SARIF outputfallow/unused-type
Commandfallow dead-code
Default severityerror
Config key in rulesunused-types
Filter option--unused-types
Suppression comment// fallow-ignore-next-line unused-type
Fixable with fallow fixNo
Opt-inNo

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 to entry.