This repository was archived by the owner on May 22, 2025. It is now read-only.
Fix externs for export defaults in declaration files #1221
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.
Export defaults are the same ts.ExportAssignment nodes as export equals
statement, which tsickle already supports. Adopted existing code for
export equals to support externs generation for export defaults, which
tsickle previously skipped.
In addition, both export equals assignments and export defaults can
export not mere identifiers but also qualified names (property
accesses). Tsickle had a test for it but it has never worked. This fixes
the issue so that proper externs are generated for qualified names too.
In doing so, a problem arised is that the previous check for
isInGlobalAugmentationstopped working when one default exports nestednamespaces in declared in global augmentation. Thus, the check for
isInGisInGlobalAugmentationwas changed to search arbitrary depth,which caused another issue with underscore-style exports, which was
resolved subsequently.