Skip to content

Comments

fix(ts): rewrite unresolved refs in merged namespaces#11562

Closed
kdy1 wants to merge 2 commits intomainfrom
kdy1/fix-issue-11514-namespace-referenceerror
Closed

fix(ts): rewrite unresolved refs in merged namespaces#11562
kdy1 wants to merge 2 commits intomainfrom
kdy1/fix-issue-11514-namespace-referenceerror

Conversation

@kdy1
Copy link
Member

@kdy1 kdy1 commented Feb 19, 2026

Summary

  • rewrite unresolved references to exported namespace members when lowering merged namespace blocks
  • keep enum/local identifier rewrites intact by only rewriting unresolved names in that fallback path
  • add a fixture regression for issue Typescript namespaces lead to ReferenceError #11514

Testing

  • cargo test -p swc_ecma_transforms_typescript --test strip -- --ignored issue_11514
  • cargo test -p swc_ecma_transforms_typescript (existing env-dependent failure: issue_960_2 requires mocha)
  • cargo fmt --all
  • cargo clippy -p swc_ecma_transforms_typescript --all-targets -- -D warnings

Fixes #11514

@changeset-bot
Copy link

changeset-bot bot commented Feb 19, 2026

⚠️ No Changeset found

Latest commit: 9d0068d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

Binary Sizes

File Size
swc.linux-x64-gnu.node 28M (28624456 bytes)

Commit: 85042be

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 19, 2026

Merging this PR will not alter performance

✅ 184 untouched benchmarks


Comparing kdy1/fix-issue-11514-namespace-referenceerror (9d0068d) with main (b24b8e0)

Open in CodSpeed

@kdy1 kdy1 closed this Feb 23, 2026
@kdy1 kdy1 deleted the kdy1/fix-issue-11514-namespace-referenceerror branch February 23, 2026 03:23
@github-actions github-actions bot modified the milestones: Planned, 1.15.13 Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Typescript namespaces lead to ReferenceError

1 participant