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

fix: types was included in the .js file output using the useJs option in sb-rn-get-stories #567

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

grgr-dkrk
Copy link
Contributor

Issue: none

What I did

The .js file output using the useJs option with sb-rn-get-stories contained types.
This PR fixes that.

The type of args of importFn is defined in @storybook/preview-api, so I deleted the definition in this file.

How to test

I verified that there are no type errors in the output .js file.

@grgr-dkrk grgr-dkrk requested a review from dannyhw as a code owner April 12, 2024 05:31
@grgr-dkrk grgr-dkrk force-pushed the fix/v7_getStories_useJsOption branch from d9cb32b to d7ba672 Compare April 12, 2024 06:36
@dannyhw
Copy link
Member

dannyhw commented Apr 15, 2024

Thanks for the contribution will get to this soon :)

@dannyhw
Copy link
Member

dannyhw commented Apr 17, 2024

whilst it does work without the type I added this type specifically because some stricter typescript settings would complain about the type being any. I've adjusted it to make it not generate that type if using js and added tests for js generation.

@dannyhw
Copy link
Member

dannyhw commented Apr 17, 2024

thanks again for raising this issue and your contribution :)

@dannyhw dannyhw merged commit e64d644 into storybookjs:next Apr 17, 2024
1 check passed
@dannyhw
Copy link
Member

dannyhw commented Apr 17, 2024

@grgr-dkrk just published this on 7.6.18 please try it :)

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.

None yet

2 participants