Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Conversation

@theseanl
Copy link
Contributor

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
isInGlobalAugmentation stopped working when one default exports nested
namespaces in declared in global augmentation. Thus, the check for
isInGisInGlobalAugmentation was changed to search arbitrary depth,
which caused another issue with underscore-style exports, which was
resolved subsequently.

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
`isInGlobalAugmentation` stopped working when one default exports nested
namespaces in declared in global augmentation. Thus, the check for
`isInGisInGlobalAugmentation` was changed to search arbitrary depth,
which caused another issue with underscore-style exports, which was
resolved subsequently.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant