Skip to content

fix: avoid duplicate type modifier in exports#384

Merged
Swatinem merged 1 commit into
Swatinem:masterfrom
privatenumber:fix-namespace-type-export-specifier
May 4, 2026
Merged

fix: avoid duplicate type modifier in exports#384
Swatinem merged 1 commit into
Swatinem:masterfrom
privatenumber:fix-namespace-type-export-specifier

Conversation

@privatenumber

@privatenumber privatenumber commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a rewrite bug where namespace exports like export { type T } became invalid export type { type T }.
  • When grouping type-only exports under export type { ... }, the fixer now prints only the export binding, e.g. T or U as V.
  • Adds a regression fixture for plain and aliased namespace type exports.

Test

  • npm test -- namespace-type-export-specifier
  • npm test

@Swatinem Swatinem left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks.

I haven’t forgotten about your other PR. Its quite large and I haven’t found enough motivation yet to look at it thoroughly.

@Swatinem Swatinem merged commit d570f10 into Swatinem:master May 4, 2026
4 checks passed
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.

2 participants