API Surface Issue
Category
Unused exports — type and interface exposed unnecessarily
Summary
| Symbol |
File |
Line |
Kind |
DomainProtocol |
src/domain-patterns.ts |
32 |
type alias |
ParsedDomain |
src/domain-patterns.ts |
37 |
interface |
Both symbols are exported but are never imported by any other module — not by production code and not by test files. The related function parseDomainWithProtocol (which returns ParsedDomain) is imported and tested, but callers rely on TypeScript's structural typing and inference rather than referencing ParsedDomain explicitly.
Evidence
$ grep -rn "DomainProtocol\|ParsedDomain\b" src/ --include="*.ts" | grep -v "^src/domain-patterns"
(no output — zero import sites found)
Exported lines:
src/domain-patterns.ts:32: export type DomainProtocol = 'http' | 'https' | 'both';
src/domain-patterns.ts:37: export interface ParsedDomain {
(Note: the related ParsedDomainList is separately tracked in #2499.)
Recommended Fix
- Remove
export from DomainProtocol (line 32) — make it a module-internal type.
- Remove
export from ParsedDomain (line 37) — make it a module-internal interface.
No callers use these types directly, so removing the exports is non-breaking.
Impact
- Dead code risk: Low (types only, no runtime effect)
- Maintenance burden: Medium — exported types widen the public contract and must be kept stable across refactors; removing them reduces that surface
Detected by Export Audit workflow. Triggered by push to main on 2026-05-04
Generated by API Surface & Export Audit · ● 662.4K · ◷
API Surface Issue
Category
Unused exports — type and interface exposed unnecessarily
Summary
DomainProtocolsrc/domain-patterns.tstypealiasParsedDomainsrc/domain-patterns.tsinterfaceBoth symbols are exported but are never imported by any other module — not by production code and not by test files. The related function
parseDomainWithProtocol(which returnsParsedDomain) is imported and tested, but callers rely on TypeScript's structural typing and inference rather than referencingParsedDomainexplicitly.Evidence
Exported lines:
(Note: the related
ParsedDomainListis separately tracked in #2499.)Recommended Fix
exportfromDomainProtocol(line 32) — make it a module-internal type.exportfromParsedDomain(line 37) — make it a module-internal interface.No callers use these types directly, so removing the exports is non-breaking.
Impact
Detected by Export Audit workflow. Triggered by push to main on 2026-05-04