-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
uppon update to svelte kit 2.0, this not working any more.
code
toast.push({
component: {
src: SuccesToast,
props: {
header: 'Successfully Saved!',
detail: 'Database is backup'
}
}
})
succesToast.svelte
<script lang="ts">
export let header: any
export let detail: any = 'Successfully Saved!'
</script>
<div class="mb-2 font-semibold">
<i class="fa-light fa-circle-check fa-xl mr-2 text-green-400"></i>
<span class="capitalize">{header}</span>
</div>
<div class="mb-0.5 text-green-300">
<i
class="fa-light fa-circle-check fa-xl invisible mr-2 text-green-400"
></i>
<span>{detail}</span>
</div>
Error
No overload matches this call.
Overload 1 of 2, '(msg: string, options?: SvelteToastOptions): number', gave the following error.
Argument of type '{ component: { src: typeof SuccesToast; props: { header: string; detail: string; }; }; }' is not assignable to parameter of type 'string'.
Overload 2 of 2, '(options: SvelteToastOptions): number', gave the following error.
Type 'typeof SuccesToast__SvelteComponent_' is not
Activity
zerodevx commentedon Dec 21, 2023
Prob due to a typescript config. Do things work if you
//ts-ignore
the call?applemate commentedon Dec 21, 2023
I use this toast all over the place, can't do the
//ts-ignore
everywherezerodevx commentedon Dec 21, 2023
No, I mean does the app work if you ignore it. I just want to be sure it's a typing error or a break, like what your title alludes to.
applemate commentedon Dec 21, 2023
well I think it will work with
//ts-ignore
. just the vs code error is annoying