From f8e1f6e72e838b0d24e940c8f6485a8bd3ffeb6c Mon Sep 17 00:00:00 2001 From: Tim Sollbach Date: Mon, 12 Dec 2022 11:15:57 +0100 Subject: [PATCH] [typescript] Add null to return type of OverridableComponent (#35311) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Sollbach Co-authored-by: MichaƂ Dudak --- packages/mui-material/src/OverridableComponent.d.ts | 4 ++-- packages/mui-types/index.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mui-material/src/OverridableComponent.d.ts b/packages/mui-material/src/OverridableComponent.d.ts index d9dd7b6e4813ee..143a9c534b033c 100644 --- a/packages/mui-material/src/OverridableComponent.d.ts +++ b/packages/mui-material/src/OverridableComponent.d.ts @@ -20,8 +20,8 @@ export interface OverridableComponent { */ component: C; } & OverrideProps, - ): JSX.Element; - (props: DefaultComponentProps): JSX.Element; + ): JSX.Element | null; + (props: DefaultComponentProps): JSX.Element | null; } /** diff --git a/packages/mui-types/index.d.ts b/packages/mui-types/index.d.ts index 2ee1b5fd7bf4ad..159d5ff5839e00 100644 --- a/packages/mui-types/index.d.ts +++ b/packages/mui-types/index.d.ts @@ -104,8 +104,8 @@ export interface OverridableComponent { */ component: C; } & OverrideProps, - ): JSX.Element; - (props: DefaultComponentProps): JSX.Element; + ): JSX.Element | null; + (props: DefaultComponentProps): JSX.Element | null; propTypes?: any; }