Closed jenseo closed 1 year ago
Thank you @jenseo for the feedback. I 'm going to look into that.
i opened a PR #599 . if you want to provide any feedback or test it (cloning locally the branch and trying to use it), please let me know.
closed with #599
Thanks!
Describe the issue you're facing
Hello, we are right now migrating our project to Svelte 4, but have a typing issue that seems to be coming from
@storyblok/svelte
.According to the migration guide section here:
https://svelte.dev/docs/v4-migration-guide#sveltecomponenttyped-is-deprecated
...the
typeof SvelteComponent
instance now need to be typed like this:typeof SvelteComponent<any>
I believe the type here has to be changed from
typeof SvelteComponent
totypeof SvelteComponent<any>
:https://github.com/storyblok/storyblok-svelte/blob/main/lib/pkg/types.ts#L4C1-L6C2
Without this change, when we initialize our components in
storyblokInit
like this:import Article from '$lib/components/Article.svelte';
...we get the following type error:
Reproduction
https://stackblitz.com/edit/vitejs-vite-tm3h2e?file=src%2FApp.svelte
Steps to reproduce
End the terminal session (
ctrl + c
) in the StackBlitz project and then runnpm run check
in the same terminal.System Info
Used Package Manager
npm
Error logs (Optional)
No response
Validations