Skip to content
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

React: Fix type inconsistencies in composeStories #21575

Merged

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Mar 13, 2023

Closes N/A

What I did

I have updated the signature for composeStories not to conflict anymore, if the user uses `Meta on the default export of a stories file.

Additionally, the types of the play function coming from a composed story got updated, so they're accounting for the Renderer and Args, as they were not before.

Related:

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

Co-authored-by: Kasper Peulen <kasperpeulen@gmail.com>
@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-composestory-conflicting-with-meta branch from 508f275 to 7aa0042 Compare March 13, 2023 13:57
@shilman shilman changed the title Update composeStories signature to accept any as arg type React: Fix composeStories signature to accept any as arg type Mar 13, 2023
@kasperpeulen kasperpeulen requested a review from yannbf March 14, 2023 13:26
Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yannbf yannbf changed the title React: Fix composeStories signature to accept any as arg type React: Fix type inconsistencies in composeStories Mar 14, 2023
@yannbf yannbf added the react label Mar 14, 2023
@valentinpalkovic valentinpalkovic merged commit 1ab3d69 into next Mar 15, 2023
@valentinpalkovic valentinpalkovic deleted the valentin/fix-composestory-conflicting-with-meta branch March 15, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants