Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain undefined initializations #36806

Merged

Conversation

weswigham
Copy link
Member

@weswigham weswigham commented Feb 14, 2020

This is a followup to #35967 based on this comment that causes us to still produce an assignment for exports without initializers, this way they can still be found by importers and have getters made for them. (92aeea3 is the unique commit in this PR)

@weswigham weswigham force-pushed the retain-undefined-initializations branch from 92aeea3 to 6f693aa Compare February 25, 2020 19:38
Copy link
Member

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

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

Just in case, undefined isn't valid in ES3.

src/compiler/transformers/module/module.ts Outdated Show resolved Hide resolved
Copy link
Member

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

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

This is adding an unnecessary exports.x = undefined for downlevel enums and modules, which includes the comments.

tests/baselines/reference/commentsDottedModuleName.js Outdated Show resolved Hide resolved
@weswigham weswigham merged commit 454cdb8 into microsoft:master Feb 26, 2020
@weswigham weswigham deleted the retain-undefined-initializations branch February 27, 2020 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants