We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A cannot find name '<variable-name>' error occurs in this very specific situation:
cannot find name '<variable-name>'
$props()
module
The error only shows up when running svelte-check, not in my IDE.
svelte-check
I was able to pinpoint the faulty version: svelte-check 4.1.2 and above. No error occurs at 4.1.1
You can take a look at the SnippetError.svelte component here. Run npm run check to see the error.
SnippetError.svelte
npm run check
https://stackblitz.com/edit/sveltejs-kit-template-default-651yg3ua?description=The%20default%20SvelteKit%20template,%20generated%20with%20create-svelte&file=package.json,src/routes/+page.svelte,src/lib/SnippetError.svelte,svelte.config.js&title=SvelteKit%20Default%20Template
Snippets should be able to access all variables declared in the script tag.
No response
The text was updated successfully, but these errors were encountered:
fix: don't hoist types referencing stores or destructured variables (#…
2f46701
…2661) #2659 #2660
No branches or pull requests
Describe the bug
A
cannot find name '<variable-name>'
error occurs in this very specific situation:$props()
).module
script in the component, empty or not.The error only shows up when running
svelte-check
, not in my IDE.I was able to pinpoint the faulty version: svelte-check 4.1.2 and above. No error occurs at 4.1.1
Reproduction
You can take a look at the
SnippetError.svelte
component here. Runnpm run check
to see the error.https://stackblitz.com/edit/sveltejs-kit-template-default-651yg3ua?description=The%20default%20SvelteKit%20template,%20generated%20with%20create-svelte&file=package.json,src/routes/+page.svelte,src/lib/SnippetError.svelte,svelte.config.js&title=SvelteKit%20Default%20Template
Expected behaviour
Snippets should be able to access all variables declared in the script tag.
System Info
Which package is the issue about?
svelte-check
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: