Skip to content

Conversation

sandersn
Copy link
Member

This PR just removes some bogus errors in the checker. The binding itself has already been fixed.

  1. Allow assignment to exports.
  2. The type of the rhs is not checked against the type of exports since they are aliased declarations.

To support more complex patterns like exports = c.name = c (see #22459), we may have to treat c.name as a declaration. That will be more complicated than this PR.

Fixes #22436

1. Allow assignment to `exports`.
2. The type of the rhs is not checked against the type of `exports`
since they are aliased declarations.

To support more complex patterns like `exports = c.name = c`, we may
have to treat `c.name` as a declaration. That will be more complicated
than this PR.
@sandersn sandersn requested review from mhegazy and weswigham April 10, 2018 21:30
@sandersn sandersn merged commit 9ceb113 into master Apr 11, 2018
@sandersn sandersn deleted the js/allow-exports-property-assignments branch April 11, 2018 13:50
sokra added a commit to webpack/webpack that referenced this pull request Apr 12, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Javascript should support property assignments on exports, even when aliased
2 participants