-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
derived
and $derived
cause lsp error
#2605
Comments
I might be wrong but I don't think theyre supposed to be used together in one file. What's stopping you from using a derived rune for the bottom example as well? |
I was using superforms and I'm trying to synchronize the stores that are produced by it. I have other states and derived variables going on too. It'll probably be fixed as svelte deprecates more features, but for now it's kind of annoying. The code works though, but the dev exp is just really bad. See red everywhere. |
Yeah but you should be able to synchronise stores with |
oh i didn't even know that. there should be more info on migrating stores to runes. i know it's technically not a fully deprecated feature, but there isn't many examples of using stores together with runes. i thought if you used stores, you have to strictly use the stores api |
Yeah should prob be better documented but stores are fully compatible with the new runes stuff so you can use them in all runes including state, derived and effect. This is useful because it makes things like dealing with SvelteKit stuff that hasnt been migrated to runes yet easier without having to use deprecated apis |
Describe the bug
When you import
derived
fromsvelte/store
, it seems like$derived
breaks the lsp.Reproduction
Use
derived
fromsvelte/store
in the same file as$derived
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: