Closed
Description
Describe the bug
I found some errors when migrating parametized slots.
Constant values are not reported correctly, and produce an error :
-<slot name="header" title="Hello World" />
+{@render header?.({ title: Hello World, })}
Dynamic values are wrapped in an additional object :
<script>
+ /** @type {{header?: import('svelte').Snippet<[any]>}} */
+ let { header } = $props();
let value = "Hello World";
</script>
-<slot name="header" title={value} />
+{@render header?.({ title: {value}, })}
=> header?.({ title: {value}, })}
might be header?.({ title: value, })}
Also: is it normal that slots are converted to snippets in the component, but not in the code that uses it?
Reproduction
See repl above
Logs
No response
System Info
REPL
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels