Skip to content

Fix TypeScript declaration export shape#5

Open
Pugsin wants to merge 1 commit into
closeio:masterfrom
Pugsin:codex/fix-typescript-declaration
Open

Fix TypeScript declaration export shape#5
Pugsin wants to merge 1 commit into
closeio:masterfrom
Pugsin:codex/fix-typescript-declaration

Conversation

@Pugsin

@Pugsin Pugsin commented Jun 7, 2026

Copy link
Copy Markdown

Fixes #3.

Summary:

  • Rewrites the declaration file to use the standard CommonJS export = pattern.
  • Keeps Address, Group, and Item types under an AddressCompiler namespace.
  • Includes the runtime compile(addresses, uniqueList?) signature.

Verification before fix:

src/addresscompiler.d.ts(7,4): error TS1036: Statements are not allowed in ambient contexts.
src/addresscompiler.d.ts(14,3): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
src/addresscompiler.d.ts(18,3): error TS2309: An export assignment cannot be used in a module with other exported elements.

Verification after fix:

npx --yes --package typescript@5.9.3 tsc --noEmit src/addresscompiler.d.ts

Result: exits 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typecheck fails

1 participant