Skip to content

each-block array destructuring#2658

Merged
Rich-Harris merged 2 commits intosveltejs:masterfrom
MikeMatrix:each-block-rest-destructuring
May 4, 2019
Merged

each-block array destructuring#2658
Rich-Harris merged 2 commits intosveltejs:masterfrom
MikeMatrix:each-block-rest-destructuring

Conversation

@MikeMatrix
Copy link
Copy Markdown
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
Copy Markdown
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