Skip to content

Commit

Permalink
[typescript] Add null to return type of OverridableComponent (#35311)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Sollbach <[email protected]>
Co-authored-by: Michał Dudak <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2022
1 parent 08bf5e6 commit f8e1f6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/mui-material/src/OverridableComponent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export interface OverridableComponent<M extends OverridableTypeMap> {
*/
component: C;
} & OverrideProps<M, C>,
): JSX.Element;
(props: DefaultComponentProps<M>): JSX.Element;
): JSX.Element | null;
(props: DefaultComponentProps<M>): JSX.Element | null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ export interface OverridableComponent<M extends OverridableTypeMap> {
*/
component: C;
} & OverrideProps<M, C>,
): JSX.Element;
(props: DefaultComponentProps<M>): JSX.Element;
): JSX.Element | null;
(props: DefaultComponentProps<M>): JSX.Element | null;
propTypes?: any;
}

Expand Down

0 comments on commit f8e1f6e

Please sign in to comment.