-
-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Hi,
generics are now officially part of Svelte 5. However, it seems to me that this parsers doesn't support them:
<script generics="KeyType extends number | string, ValueType" lang="ts">
import type { Snippet } from "svelte";
interface Props {
children?: Snippet<[KeyType, ValueType]>;
options: Array<[KeyType, ValueType]>;
selected: Array<KeyType>;
}
let { children, options, selected = $bindable() }: Props = $props();
selected;
</script>
{#each options as [id, value] (id)}
<label>
<input type="checkbox" value={id} bind:group={selected} />
<span></span>
{@render children?.(id, value)}
</label>
{/each}
Gives 'ValueType' is not defined
and similar
I tried to create a repro, but the playground is stuck at "Starting WebContainer"...
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request