-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[email protected] breaks snippets with arguments typed as an object literal #12137
Comments
You are using the wrong syntax to declare snippers {@render x()}
-{@snippet x()}
+{#snippet x()}
{/snippet} |
Sorry my bad, I have updated the description |
Yeah but this works fine for me |
@paoloricciuti Sorry, I think I have found the actual root cause. I was using typescript, and for one snippet I decide to make it one argument that's an object, something like this {#snippet x(obj: {a: string, b: string} )}
{/snippet} which breaks everything else. When I tried to remove that type anotation (or change the type to something else like I have updated the description. |
Should be already fixed in the latest version |
@paoloricciuti Sorry I misunderstood your message a few hours ago. I'm not sure if https://svelte-5-preview.vercel.app is running the latest version, because the code shouldn't work on the latest version (which is |
Uh I think I know why! |
This is actually a problem with the language tools...i'm gonna open a PR there |
Thank you! I have opened sveltejs/language-tools#2411, should I close this issue or keep this open? |
@dummdidumm this can be closed too |
Describe the bug
[email protected] breaks snippets with arguments typed as an object literal
Reproduction
https://www.sveltelab.dev/7y2aelivl6k6jlp
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: