-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Props: Fix typescript unspecified default value #9873
Conversation
Is it really the following line that fix the issue? |
@patricklafrance Yes, AFAICT. i'm not familiar with your code yet, so perhaps there's a better fix elsewhere. the rest of the PR is just updated (fixed) snapshots |
I don't understand how it could be the problem. Furthermore if the user is not using react-docgen for TS, he doesn't go through this code. I can't find which version of SB he is running, is he on an alpha version with react-docgen? |
@patricklafrance You don't need to know anything about the user's setup for this. The problem is repro'd multiple times in the snapshot tests, and the fix appears to be working. What am I missing? |
Unless you are using In react-docgen, you have the following:
https://github.com/reactjs/react-docgen#result-data-structure When using Overall if it fix a bug I don't mind, I am asking because I don't understand how it could fix something. |
Does that mean that the typescript handling code is basically unused in 5.3? |
@shilman unless something changes after my last commit, YES. It was going to be used once I rework the docs presets to include |
Props: Fix typescript unspecified default value
Issue: #9827
What I did
Mapping a function that takes two arguments passes the index as the second argument. Fixed & tested!
How to test
See updated snapshots & chromatic changes