From 87ee19e698cab7d0092fd57915fdea1f5f670130 Mon Sep 17 00:00:00 2001 From: Vetin <48985663+Vetin@users.noreply.github.com> Date: Wed, 7 Jun 2023 20:47:36 +0400 Subject: [PATCH] type(menu): replace component interface with type #42907 (#42908) Co-authored-by: Egor Miasniankin --- components/menu/MenuItem.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/menu/MenuItem.tsx b/components/menu/MenuItem.tsx index 46240759a8..c5c34df500 100644 --- a/components/menu/MenuItem.tsx +++ b/components/menu/MenuItem.tsx @@ -28,12 +28,12 @@ type GenericProps = T extends infer U extends MenuItemProps : U : MenuItemProps; -interface GenericComponent extends Omit { +type GenericComponent = Omit & { ( props: GenericProps, ...args: RestArgs ): ReturnType; -} +}; const MenuItem: GenericComponent = (props) => { const { className, children, icon, title, danger } = props;