Skip to content

Allow exports assignments - #23319

Merged
Nathan Shively-Sanders (sandersn) merged 1 commit into
masterfrom
js/allow-exports-property-assignments
Apr 11, 2018
Merged

Nathan Shively-Sanders (sandersn) merged 1 commit into
masterfrom
js/allow-exports-property-assignments

Conversation

@sandersn

Copy link
Copy Markdown
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.
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