-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Milestone
Description
Describe the problem
Rest args and spreads are not supported, the latter of which has a specific error message:
cannot use spread arguments in {@render ...} tags
Is there a reason why these patterns are not supported?
{#snippet test(...items)}
{#each items as item}
<p>{item}</p>
{/each}
{/snippet}
{@render test(1, 2, 3)}<script>
const args = [1, 2, 3];
</script>
{#snippet test(a, b, c)}
{a} {b} {c}
{/snippet}
{@render test(...args)}Describe the proposed solution
Support rest/spread analogous to how they work with functions.
Importance
nice to have
hanszoons
Metadata
Metadata
Assignees
Labels
No labels