Closed mcmxcdev closed 1 year ago
Are you using Svelte 3? I'm using Svelte 3 in my SvelteKit project and also encountered the same type errors.
This might be an issue with new types in Svelte 4. I created a new SvelteKit project with Svelte 4 and no errors showed up.
I already feared that this would be the case, thanks for confirming it!
Fixed by upgrading to Svelte 4.
This dependency needs to drop Svelte 3 from it's peer dependencies here since it's misleading: https://github.com/storybookjs/addon-svelte-csf/blob/main/package.json#L98
@RSWilli seems like Svelte 4 did break our typing system after all - I'm not sure there's an easy fix here.
My suggestion would be to release a new major which only allows Svelte 4 as a peer dependency. Alongside that we could also release a new patch that that only allows Svelte 3 as a peer dependency, so we'd release two new versions that clearly defines the necessary dependencies. Thoughts?
I believe this is fixed now. Please use version 3.0.10 of this plugin with Svelte 3 and version 4 of this plugin with Svelte 4
Describe the bug
I am encountering TS issues with all imports from
@storybook/addon-svelte-csf
:The exact same message with a different
typeof
is repeated forTemplate
andStory
imports.Expected behavior
No TS issues
Environment
Additional context
Story looks like this:
Config is as follows: