Skip to content

Bug: Using the auto-subscription syntax for a store that was defined in the context="module" script yields an error.  #850

@aradalvand

Description

@aradalvand

Take a look at the Test component in the following REPL:
https://svelte.dev/repl/4859affa8c1c436783a9d9a6d537c903?version=3

A store is created in a context="module" script tag, and it's being used with a dollar sign $ prepended to it, in the markup. It works as expected. However, the very same code in VS Code shows an error:

image

Note that it works and compiles properly, in other words, the compiler gives no errors; so it must be the Svelte VS Code extension that's the problem, basically it doesn't properly recognize any store that's been defined in the context="module" script, and as a result causing a red squiggly to appear under $count here.

Also, it's only when the lang="ts" attribute is present on the <script> tag that the red squiggly appears.

I'd appreciate it if this can be fixed soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions