Open MrWaip opened 1 month ago
This is also reproduced with typescript enams
There is obviously some bug in the analyzer. I do not mutate the object, but read its property
The warning is telling you that if Marker.A
is changed elsewhere, this reactive statement will not trigger in legacy mode.
The warning is correct in principle, but if Marker.A
is immutable, this is a false positive.
You can ignore the warning using
// svelte-ignore reactive_declaration_non_reactive_property
In my case Marker
is immutable. It's enum.
I don't really like the idea of monkey patching everywhere with comments)
The problem is probably that components are analyzed in isolation, possibly without type information from the outside; at least that used to be the case previously.
The problem is probably that components are analyzed in isolation, possibly without type information from the outside; at least that used to be the case previously.
Yup this is correct
Tricky rule
here's a Svelte 5 upgrade PR that has lots of ignores related to this warning if you want to see some examples: https://github.com/immich-app/immich/pull/13738
Describe the bug
Hi, I just updated svelte to version 5, and I get this warning
There is obviously some bug in the analyzer. I do not mutate the object, but read its property
Reproduction
https://svelte.dev/playground/d38ff4e52c9c4b1cb7b5314a662e479a?version=5.0.5
Logs
No response
System Info
Severity
annoyance