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
[typescript] Fix for Popover -> PaperProps typing #8129
Conversation
@xaviergonz Can you please add a test for the |
@@ -24,7 +24,7 @@ export type PopoverProps = { | |||
transformOrigin?: Origin; | |||
transitionDuration?: number | 'auto'; | |||
theme?: Object; | |||
} & Partial<TransitionHandlers> & | |||
PaperProps; | |||
PaperProps?: Partial<PaperProps>; |
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.
Partial
is not needed, but also doesn't hurt, I guess :)
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.
just to be future proof in case paper ever gets a required prop :)
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.
Good thinking.
@xaviergonz I was waiting for a test case, but in the end, it's always better to have this fix than nothing. Thank you :) |
Sorry, I didn't have the time to, just got home from work :-S |
@xaviergonz I understand that it can be hard to find some time to contribute. It's already a step forward. I don't think typing tests are as important as unit tests for our component as the checks are static, you have a very kick feedback loop between breaking one and fixing it. The main issue is around shipping a broken typescript to the users. So, having some is a nice to have :). |
This was failing in ts: