-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Types are missing/unavailable for options.storySort
#22779
Comments
We should fix that. There are types for that here: https://github.com/storybookjs/storybook/blob/next/code/lib/types/src/modules/csf.ts#L67-L71 I'm not sure what work is required to hook that up across all the different renderers. @kasperpeulen thoughts? |
Another issue here. If I add types manually, like this:
and then try to build Storybook, it bails with a parsing error:
|
You can't add types according to the docs https://storybook.js.org/docs/writing-stories/naming-components-and-hierarchy#sorting-stories Using ts-ignore removes Typescript warning.
Works for me this way. |
Describe the bug
Even if I apply the
Preview
type (from @storybook/react), TypeScript doesn't know the types of the arguments tostorySort
:The migration guide says that these arguments are of type
StoryIndexEntry
, but I can't find this type in the Storybook packages. I shouldn't even need to, becausestorySort
should already have the correct types assigned to it.To Reproduce
System
Additional context
No response
The text was updated successfully, but these errors were encountered: