-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Hi, I have this error on 'svelte-check' when I send a component inside the toast.
Error: Type 'Component<$$ComponentProps, {}, "">' is not assignable to type 'SvelteComponent'.
Type 'Component<$$ComponentProps, {}, "">' is not assignable to type 'new (options: ComponentConstructorOptions<Record<string, any>>) => SvelteComponent<Record<string, any>, any, any>'.
Type 'Component<$$ComponentProps, {}, "">' provides no match for the signature 'new (options: ComponentConstructorOptions<Record<string, any>>): SvelteComponent<Record<string, any>, any, any>'.
component: {
src: Toast,
props: {
here my code:
let toastId = toast.push( {
component: {
src: Toast,
props: {
onClose: () => {
toast.pop(toastId);
}
}
},
duration: 5000,
})
I'm using sveltik 2 (so svelte 5), maybe it's a compatibility error ?
I use $props
inside my Toast component to use a close event:
let { onClose }: { onClose: () => void } = $props();
It work as is, but the svelte-check
doesn't like this :/
Metadata
Metadata
Assignees
Labels
No labels