-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Critial: static analyze some.svelte.ts #11605
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
Comments
Please provide a reproduction (via sveltelab.dev or stackblitz or Github repo) so we can look into why the |
https://github.com/Black1358/svelte-error-ts I created a repository and found what is the trigger of my problem. p.s. With ES2022 all works correctly |
This is a documentation issue for TS usage.
If constructor assignments are allowed (#11455), just the transpilation of classes would need to be prevented. |
Ran into this issue as well, none of the solutions described above worked for me, and it took me a while to figure out what was happening. TypeScript was configured using a |
Got solved, thanks. I think additional compilation warning would be better if left attended for a long time. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
This code throw Error when file named with .ts extention:
CompileError:
$state(...)
can only be used as a variable declaration initializer or a class fieldIf the file is named .js, everything is working correctly.
Reproduction
I've been researching the internal files and this is what I found:
svelte\src\compiler\phases\2-analyze:
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: