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

CSF: Add satisfies support to csf-tools #20088

Merged
merged 1 commit into from
Dec 5, 2022
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Dec 5, 2022

Issue: #20033

What I did

Add "satisfies" check, similar to how we how we handed "as"

How to test

  • See attached tests

@shilman shilman marked this pull request as ready for review December 5, 2022 09:11
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!

@shilman shilman merged commit 7af491a into next Dec 5, 2022
@shilman shilman deleted the shilman/support-ts-satisfies branch December 5, 2022 09:29
dedent`
import type { Meta, StoryFn } from '@storybook/react';
type PropTypes = {};
export default { title: 'foo/bar/baz' } as Meta<PropTypes>;

Choose a reason for hiding this comment

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

Shouldn't this be:

export default { title: 'foo/bar/baz' } satisfies Meta<PropTypes>;

@shilman

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.

3 participants