-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
destructure await #4548
destructure await #4548
Conversation
c1d394a
to
96156d0
Compare
81b7845
to
e546487
Compare
Is there some DRYing that we can do between each block destructuring and await block destructuring now? We can do that in a separate issue/PR if so. |
oh.. i didn't know there's another util for each destructuring, https://github.com/sveltejs/svelte/blob/master/src/compiler/parse/read/context.ts#L46 interestingly, it doesn't support default values in destructuring: {#each list as { a = 2 }} // error: assignment pattern are not supported
{#each list as [ a = 2 ]} // error: assignment pattern are not supported do you think we should support that when DRYing them out? |
Svelte 3.20.0 introduced support for await destructing, see svetlejs/svelte#1851 and sveltejs/svelte#4548. This change supports this syntax and keep this plugin functional with the newest svelte version
Fixes #1851