-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
Having something as simple as this
<script>
await Promise.resolve();
const [] = $derived([]);
</script>throws a ReferenceError $$array is not defined
this is because this is the generated code
import 'svelte/internal/disclose-version';
import 'svelte/internal/flags/async';
import * as $ from 'svelte/internal/client';
export default function App($$anchor) {
var $$promises = $.run([
() => Promise.resolve(),
() => {
var $$d = $.derived(() => []);
$$array = $.derived(() => $.to_array($.get($$d), 0));
}
]);
}which means $$array is not a multi declaration with $$d how it should be.
Reproduction
Logs
System Info
replSeverity
annoyance
Metadata
Metadata
Assignees
Labels
No labels