-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Autosubscribed stores no longer listed as referenced in vars
#4081
Comments
Another interesting thing is that There's code in that method here to check for an auto-subscribe so we should probably just also tag it with PR on the way... just running CI tests now. |
Actually, I think the change to the expected output is OK since it used to be there before @Rich-Harris made his changes (though in a different order). |
@Conduitry why do you have to use this syntax? |
What syntax? I'm not sure what you're asking. |
let store;
$store; |
Describe the bug
Since #3945, autosubscribing to a store within the template no longer causes the store to be marked as
referenced: true
in thevars
response from the compiler.Logs
n/a
To Reproduce
Compile this, and look at the
vars
value in the response.store
hasreferenced: false
.Expected behavior
store
should havereferenced: true
.Stacktraces
n/a
Information about your Svelte project:
Svelte 3.16.0, 3.16.1
Severity
Moderate. Causing new incorrect warnings in the ESLint plugin - sveltejs/eslint-plugin-svelte3#49
Additional context
Unlike the above, this seems to be working correctly:
The text was updated successfully, but these errors were encountered: