Svelte 5: $derived
state mutation in function expressions does not error at compile time
#11211
Milestone
$derived
state mutation in function expressions does not error at compile time
#11211
Describe the bug
Currently, state mutation inside derived runes is not detected at compile time if a function expression is used e.g.
$dervied.by
or$dervied
with an IIFE. Instead, if you increase the count to 5, you'll see the error at runtime. This is not ideal.Reproduction
REPL
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: