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

Self reference within destructuring #11

Open
thysultan opened this issue Jan 16, 2019 · 0 comments
Open

Self reference within destructuring #11

thysultan opened this issue Jan 16, 2019 · 0 comments

Comments

@thysultan
Copy link

The syntax makes it look like the binding would not be available inside the destructuring context.

For example consider the following:

function fn (arg pick {a, b = arg.b = 'value'}) {}

This visually queues that you can reference arg within the de-structure to archive the above. However with the current grammer:

function fn ({a, b = arg.b = 'value'} as arg) {}

Unless i'm mistaken and the two are indeed equivalent as far as being able to self reference the argument within the destructuring context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant