Skip to content

[Export Audit] DomainProtocol and ParsedDomain exported from src/domain-patterns.ts but never imported #2502

Description

@github-actions

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

  1. Remove export from DomainProtocol (line 32) — make it a module-internal type.
  2. 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 ·

  • expires on Jun 3, 2026, 4:01 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions