-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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]: summary: undefined
type issue
#27129
Open
Hyzual opened this issue
May 14, 2024
· 5 comments
· May be fixed by #27202 or ComponentDriven/csf#94
Open
[Bug]: summary: undefined
type issue
#27129
Hyzual opened this issue
May 14, 2024
· 5 comments
· May be fixed by #27202 or ComponentDriven/csf#94
Comments
@Hyzual Any chance you can open a PR with the fix? |
OK, I'll open one next week👌 |
8 tasks
Hyzual
added a commit
to Hyzual/csf
that referenced
this issue
Jun 11, 2024
Closes storybookjs/storybook#27129 Allowing explicitly undefined as type for table.type.summary lets Story authors disable the automatic type summary while having strict TypeScript options. With exactOptionalPropertyTypes enforced, using undefined as a type was forbidden, as TypeScript would raise an error. With this change, it should be allowed.
@Hyzual If it is still open, can you please assign this to me? I think I have found the bug. |
@Tanuj1718 it is still open. I'd be happy to, but I don't have permission to assign the issue (or the PR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hello,
We are using storybook with Typescript. When trying to upgrade to v8.0.10, we encountered a type issue when we want to suppress the automatic
summary
generated for Controls. Previously, we would make itnull
like so:With the change introduced at commit 3f7e1c2b84324ca24bc5bc968a6ab3245b11b757,
null
is no longer allowed. So we tried to useundefined
instead. But since we use the stricterexactOptionalPropertyTypes: true
configuration in ourtsconfig.json
, TypeScript raises the following error:Could you please change the type of
summary
tosummary?: string | undefined
so that we can keep our strict settings as well as disable the summary in controls ?To Reproduce
Here is a link to reproduce: https://stackblitz.com/edit/github-wuwtca-dcgxst?file=src%2Fstories%2FButton.stories.ts
TypeScript raises an error in
src/stories/Button.stories.ts
, inargTypes
property ofmeta
.System
Additional context
No response
The text was updated successfully, but these errors were encountered: