Skip to content

[Bug]: Svelte 5 decorator giving type error #29951

Open
@twoends

Description

@twoends

Describe the bug

The decorator option gives a type error on the imported component:
Svelte: Type Component<Props, {}, ''> has no properties in common with type SvelteStoryResult<Component<Props, {}, ''>>

Reproduction link

https://stackblitz.com/edit/github-h1zsrmcf?file=src%2Fstories%2FButton.stories.ts

Reproduction steps

  1. Go to the above link
  2. Wait a bit for the scripts to run
  3. Look at the error on line 18

System

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.22621
    CPU: (6) x64 Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
  Binaries:
    Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.1 - ~\AppData\Roaming\npm\npm.CMD <----- active
  Browsers:
    Edge: Chromium (127.0.2651.74)
  npmPackages:
    @storybook/addon-a11y: ^8.4.7 => 8.4.7
    @storybook/addon-essentials: ^8.4.7 => 8.4.7
    @storybook/addon-interactions: ^8.4.7 => 8.4.7
    @storybook/addon-svelte-csf: ^5.0.0-next.13 => 5.0.0-next.13
    @storybook/blocks: ^8.4.7 => 8.4.7
    @storybook/svelte: ^8.4.7 => 8.4.7
    @storybook/sveltekit: ^8.4.7 => 8.4.7
    @storybook/test: ^8.4.7 => 8.4.7
    chromatic: ^11.20.0 => 11.20.0
    eslint-plugin-storybook: ^0.11.1 => 0.11.1
    storybook: ^8.4.7 => 8.4.7

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions