-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
I don't know if this is a deliberate syntax design or not, but apparently, I cannot de-structure the output of my async function using $derived().
This result in an Unexpected reserved word error :
const {foo,bar} = $derived(await someAsyncFunction())
Reproduction
Logs
app.js:54
SyntaxError: Unexpected reserved word
handleError @ app.js:54System Info
System:
OS: Windows 11 10.0.26100
CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-13420H
Memory: 10.12 GB / 23.71 GB
Binaries:
Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
bun: 1.2.6 - ~\.bun\bin\bun.EXE
Browsers:
Edge: Chromium (131.0.2903.86)
Internet Explorer: 11.0.26100.1882
npmPackages:
svelte: ^5.36.7 => 5.36.7Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels