Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

break in sveltekit 2.0 #91

Open
craigcosmo opened this issue Dec 20, 2023 · 4 comments
Open

break in sveltekit 2.0 #91

craigcosmo opened this issue Dec 20, 2023 · 4 comments

Comments

@craigcosmo
Copy link

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 
@zerodevx
Copy link
Owner

Prob due to a typescript config. Do things work if you //ts-ignore the call?

@craigcosmo
Copy link
Author

craigcosmo commented Dec 21, 2023

I use this toast all over the place, can't do the //ts-ignore everywhere

@zerodevx
Copy link
Owner

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.

@craigcosmo
Copy link
Author

well I think it will work with //ts-ignore. just the vs code error is annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants