From 1b6ae4bd1486fe791f2032e8fb1a1d3659099349 Mon Sep 17 00:00:00 2001 From: Joris Masson Date: Tue, 11 Jun 2024 11:50:53 +0200 Subject: [PATCH] fix: Explicitly allow undefined type for table.type.summary 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. --- src/story.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/story.ts b/src/story.ts index df41a93..c968756 100644 --- a/src/story.ts +++ b/src/story.ts @@ -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