API Surface Issue
Category
Unused export
Summary
- File:
src/commands/main-action.ts
- Symbol:
OptionSourceResolver
- Line: 65
- Issue:
OptionSourceResolver is exported as a public type but is never imported by any other module in the codebase. It is only referenced internally within main-action.ts as the parameter type for createMainAction.
Evidence
Declaration (line 65):
export type OptionSourceResolver = (optionName: string) => string | undefined;
Usage within the same file only (line 73):
export function createMainAction(getOptionValueSource: OptionSourceResolver) {
Cross-file import search result:
$ grep -rn "OptionSourceResolver" src/ --include="*.ts" | grep -v "main-action.ts"
(no output — zero external consumers)
ts-prune did not surface this because the type is used within its own module, but a whole-word grep across all src/**/*.ts files confirms no other file imports it.
Recommended Fix
Remove the export keyword from the type declaration since it serves no external consumers:
// Before
export type OptionSourceResolver = (optionName: string) => string | undefined;
// After
type OptionSourceResolver = (optionName: string) => string | undefined;
If the type is intended to be part of a public API for external consumers (e.g., plugins or tests that call createMainAction directly), add documentation and a test that imports it.
Impact
- Dead code risk: Low — it's just a type alias, no runtime overhead
- Maintenance burden: Low — but exported types are implicitly "pinned" by semver; removing
export later would be a breaking change if consumers exist
Detected by Export Audit workflow. Triggered by push to main on 2026-05-12
Generated by API Surface & Export Audit · ● 1M · ◷
API Surface Issue
Category
Unused export
Summary
src/commands/main-action.tsOptionSourceResolverOptionSourceResolveris exported as a public type but is never imported by any other module in the codebase. It is only referenced internally withinmain-action.tsas the parameter type forcreateMainAction.Evidence
Declaration (line 65):
Usage within the same file only (line 73):
Cross-file import search result:
ts-prunedid not surface this because the type is used within its own module, but a whole-word grep across allsrc/**/*.tsfiles confirms no other file imports it.Recommended Fix
Remove the
exportkeyword from the type declaration since it serves no external consumers:If the type is intended to be part of a public API for external consumers (e.g., plugins or tests that call
createMainActiondirectly), add documentation and a test that imports it.Impact
exportlater would be a breaking change if consumers existDetected by Export Audit workflow. Triggered by push to main on 2026-05-12