-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Svelte for VS Code v102.5.0 / svelte-check 1.1.09 Breaks TS support in .svelte files when style tag present below #655
Comments
Do you have a minmum code snippet that reproduce this for you, more specifically, a code snippet where the "unexpected token" error happens (my guess is all the other errors are because of that)? I cannot reproduce it given your description. |
With svelte-check 1.1.8
With svelte-check 1.1.9
The line in question just defines a variable with a type: |
If someone is looking for a work-around:
Don't forget to re-enable auto-updates later |
Looks like a PR just came in but in case it still helps, here's the smallest example I could get to reproduce reliably: <script context="module" lang="typescript">
class Control {
el: string;
}
</script>
<script lang="typescript">
</script> |
This should be fixed with Svelte for VS Code 102.5.1 / |
Could we add a test for this to prevent stuff like this in the future? I'd love to do it, but I couldn't find any tests in this repo, maybe you can give me a hint. Just some background: I'm new to Svelte and I've spent about 2-3 hours trying to figure out what was going on. First, the svelte extension broke after I reloaded vs code (which I didn't realize at that time), and then svelte-check stopped working after I reinstalled all the packages (which I also didn't realize at that time). I couldn't google anything or find anything in the troubleshooting guide for svelte-check, since this is apparently the first time something like this happened. Not a great experience. For somebody coming from React, a great typescript experience is a must. I was about to ditch Svelte for good :( |
I added a test with the fix which you can see in the commit. Threatening to leave is not helping. |
Awesome, I missed that it's already included in the commit :) BTW I'm not "threatening", I was merely trying to describe a situation it got me into and how it made me feel, that's all. |
Describe the bug
Imports and markup-interop type-hints break in .svelte files for version 102.5.0.
<div>{obj.value}</div>
) provides no type hints.<script lang="ts">
.Reverting back to v102.4.0 fixes these issues:
code --install-extension svelte.svelte-vscode@102.4.0
.To Reproduce
Install
svelte.svelte-vscode@102.5.0
. Compare tosvelte.svelte-vscode@102.4.0
.Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
System (please complete the following information):
Additional context
To be clear, my app runs as expected, it looks to be entirely a tooling issue.
The text was updated successfully, but these errors were encountered: