with svelte@5.0.0-next.164, svelte-check incorrectly report errors snippets with arguments typed as an object literal
lts20050703 opened this issue · 1 comments
lts20050703 commented
Describe the bug
with svelte@5.0.0-next.164, svelte-check incorrectly report errors snippets with arguments typed as an object literal
Type '(this: void, obj: { a: string; b: string; }) => void' is not assignable to type '(this: void, args_0: { a: string; b: string; }) => unique symbol & { _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\""; }'.
Type 'void' is not assignable to type 'unique symbol & { _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\""; }'.
Type 'void' is not assignable to type 'unique symbol'.
Reproduction
<script lang="ts">
</script>
{#snippet x(obj: {a: string, b: string} )}
{/snippet}
https://www.sveltelab.dev/7y2aelivl6k6jlp
Expected behaviour
svelte-check doesn't report any errors.
System Info
System:
OS: Linux 6.5 KDE neon 6.0 6.0
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 7.72 GB / 15.40 GB
Container: Yes
Shell: 3.7.1 - /usr/bin/fish
Binaries:
Node: 22.3.0 - ~/.local/share/nvm/v22.3.0/bin/node
npm: 10.8.1 - ~/.local/share/nvm/v22.3.0/bin/npm
pnpm: 8.15.3 - ~/.local/share/nvm/v22.3.0/bin/pnpm
bun: 1.1.10 - ~/.bun/bin/bun
Browsers:
Brave Browser: 126.1.67.119
npmPackages:
svelte: ^5.0.0-next.164 => 5.0.0-next.164
Which package is the issue about?
svelte-check
Additional Information, eg. Screenshots
According to paoloricciuti, "This is actually a problem with the language tools" (sveltejs/svelte#12137 (comment))
paoloricciuti commented
Here's the pr that should fix this