Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

handle Literal types as ObjectPattern keys #27

Merged
merged 3 commits into from
May 6, 2018

Conversation

edoardocavazza
Copy link
Contributor

fixes #25

added Literal to extractors

@guybedford
Copy link
Contributor

Thanks for the PR here. Could you please add a test for the ObjectPattern case here?

@edoardocavazza
Copy link
Contributor Author

Sure!

@guybedford
Copy link
Contributor

Thanks for the quick fix Do you think we could include a nested case like:

({ a: { b: c } } = { a: { b: 'b' } });

just to be sure the destructuring plays out right?

@edoardocavazza
Copy link
Contributor Author

Hi @guybedford, I am sorry for the delay. I added the case let { a: { b: c } } = { a: { b: 'b' } }; and it seems to work, but I found out that the library does not handle ExpressionStatements like you suggested. If you agree, I can open an issue for that.

@guybedford
Copy link
Contributor

@edoardocavazza sure it would be great to create an issue for that.

This looks great to me, thanks again for the PR.

@guybedford guybedford merged commit 7f4d328 into rollup:master May 6, 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.

extractNames does not work with ObjectPattern with literal keys
2 participants