Repository navigation
fix(api-extractor): preserve namespace import-equals exports - #6194
Open
Darsh Patel (darshpatel1052) wants to merge 1 commit into
Open
Darsh Patel (darshpatel1052) wants to merge 1 commit into
Darsh Patel (darshpatel1052) wants to merge 1 commit into
Conversation
Darsh Patel (darshpatel1052)
requested review from
Bharat Middha (bmiddha),
David Michon (dmichon-msft) and
Jonathon Anthony (jxanthony)
as code owners
November 3, 2026 06:15
Author
|
@microsoft-github-policy-service agree |
Contributor
|
Darsh Patel (@darshpatel1052) - Thanks for looking into this! Our team uses api-extractor and this resolves one of the bugs that we were having to work around! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #6193.
Preserves the
exportkeyword onexport import X = Yaliases inside namespaces, allowing consumers to access those aliases from declaration rollups. Also fixes the missing keyword in API reports.Details
Extends
DtsEmitHelpers.isExportKeywordInNamespaceExportDeclarationto recognizeImportEqualsDeclarationalongsideExportDeclaration. Both output generators already use this helper.Adds a regression scenario covering direct and nested namespace aliases, generated snapshots, and a consumer compilation check that uses each alias as both a type and a value. Includes a patch changelog entry.
How it was tested
e8f354e8bc, ranrush test --only @microsoft/api-extractor --only api-extractor-scenarios --production --parallelism 2: all 89 unit tests and 62 scenarios passed, including consumer compilation.rush change --verify --target-branch upstream/main --no-fetch.Validation used
RUSH_ALLOW_UNSUPPORTED_NODEJS=1because the installed Node.js 22.23.3 is one patch below the repository’s minimum.