-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Preserve existing options passed to styled calls #584
Preserve existing options passed to styled calls #584
Conversation
Let's preserve the rest of the arguments and for the flow errors, just add |
So I think this is code-complete, you can make a code review of this. I'd appreciate hints on how to fix those flow types, I always struggle with a little bit more complicated cases :s |
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 Typing this well with flow is hard since flow doesn't know how the isSomeNodeTypeHere
stuff works and etc. It's basically more effort than it's worth, we just use flow here for more basic stuff, i.e. functions are called with the correct number of arguments, things that are being imported actually exist and etc.
fixes #582
What:
Preserving existing options passed to styled calls when using emotion's babel plugin
Why:
It would ease creating custom emotion wrappers.
How:
Checklist:
TODO:
buildStyledObjectCallExpression
)