Skip to content

Fix: Allow undefined for summary in PropSummaryValue #33376

Closed
rahulb18 wants to merge 1 commit into
storybookjs:nextfrom
rahulb18:fix/issue-27129-summary-undefined-type
Closed

Fix: Allow undefined for summary in PropSummaryValue #33376
rahulb18 wants to merge 1 commit into
storybookjs:nextfrom
rahulb18:fix/issue-27129-summary-undefined-type

Conversation

@rahulb18
Copy link
Copy Markdown

Summary

Fixes #27129

This PR allows users with exactOptionalPropertyTypes: true to explicitly set summary and detail to undefined in argTypes.

Changes

  • Updated PropSummaryValue interface in PropDef.ts to include | undefined
  • Updated InputType table types in story.ts
  • Updated PropSummaryValue detail in ArgsTable/types.ts

Test Plan

  • ✅ All existing tests pass (112 tests)
  • ✅ PropDef tests: 26 passed
  • ✅ Custom elements tests: 2 passed
  • ✅ No new TypeScript errors introduced

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change

Fixes storybookjs#27129

This change allows users with exactOptionalPropertyTypes: true
to explicitly set summary and detail to undefined in argTypes.

Changes:
- Updated PropSummaryValue interface in PropDef.ts
- Updated InputType table types in story.ts
- Updated PropSummaryValue detail in ArgsTable types.ts
@ndelangen
Copy link
Copy Markdown
Member

Hey @rahulb18 thank you so much for your PR, it's truly appreciated!

We talked about this during the weekly triage meeting:
The consensus was that we'll want to address this issue a bit broader, and @Sidnioulz has made a PR doing just that here:
#33149

I'll review that PR and merge it if possible.

@ndelangen ndelangen closed this Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: summary: undefined type issue

2 participants