mirror of https://github.com/sveltejs/svelte
feat: better destructuring assignments (#12872)
* preserve existing destructuring assignments where appropriate * add test * changesetpull/12856/head
parent
686b0865c5
commit
39c559a0d7
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: better destructuring assignments
|
@ -1,6 +1,9 @@
|
||||
let a = $state(1);
|
||||
let b = $state(2);
|
||||
let c = 3;
|
||||
let d = 4;
|
||||
|
||||
export function update(array) {
|
||||
[a, b] = array;
|
||||
[c, d] = array;
|
||||
}
|
||||
|
Loading…
Reference in new issue