-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[typescript] Add null to return type of OverridableComponent #35311
[typescript] Add null to return type of OverridableComponent #35311
Conversation
|
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.
Thanks for the fix! It's a great first PR in MUI!
@@ -20,7 +20,7 @@ export interface OverridableComponent<M extends OverridableTypeMap> { | |||
*/ | |||
component: C; | |||
} & OverrideProps<M, C>, | |||
): JSX.Element; | |||
): JSX.Element | null; | |||
(props: DefaultComponentProps<M>): JSX.Element; |
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.
I think this return type should also be JSXElement | null
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.
👍 Right, I missed it as well
closes #32420