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

each-block array destructuring #2658

Merged

Conversation

MikeMatrix
Copy link
Contributor

@MikeMatrix MikeMatrix commented May 2, 2019

Inspired by #2647, I've been messing about with the parser code to integrate array destructuring.
Might be of use for somebody working on that issue.

This should allow something like:

{#each sequence as [first, ...rest]}
   <b>{first}</b><i>{rest}</i>
{/each}

@Rich-Harris Rich-Harris merged commit 5a536aa into sveltejs:master May 4, 2019
@Rich-Harris
Copy link
Member

this is very cool, thank you!

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

Successfully merging this pull request may close these issues.

2 participants