-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
Add support for intersection types/interfaces #915
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for react-docgen ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks a lot, i will try to find some time to review this in the coming weeks. Probably will take a little while. |
Hey i needed to convert the PR to a draft for the moment. I realized that the codeHelper needs similar modifications to support union types and i'm not done yet. And i'm pretty sure i have not tested all possible cases yet - i want to extend the tests to fully cover that ;-) |
Hi @danez, i'm happy now with the output produced - with these changes in place, our team would be unblocked to finally migrate from The other thing is the typing - i'm not happy with that what i've done in And finally, please help me out with flow types - i have never really worked with flow typing and i already failed trying to setup an example repo for that. For now i'm going to publish a fork for this package with all changes so we can test it thoroughly in our e-commerce platform. |
This change adds support for complex union interfaces like the following:
Expected result would be something like:
I have added a test to address this, and i was fighting pretty hard with the existing types (chat gpt was a big help) - but i'm pretty sure there is room for improvement, help would be appreciated :)
TODOS
Fixes #914