Skip to content

Commit

Permalink
fix: Explicitly allow undefined type for table.type.summary
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Hyzual committed Jun 11, 2024
1 parent fa77c25 commit 1b6ae4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export interface InputType {
/**
* @see https://storybook.js.org/docs/api/arg-types#tabletype
*/
type?: { summary?: string; detail?: string };
type?: { summary?: string | undefined; detail?: string };
};
/**
* @see https://storybook.js.org/docs/api/arg-types#type
Expand Down

0 comments on commit 1b6ae4b

Please sign in to comment.