From c51031ae53e18722863c73bf7dcb1d57658a21b8 Mon Sep 17 00:00:00 2001 From: thinkasany <117748716+thinkasany@users.noreply.github.com> Date: Fri, 14 Jul 2023 13:25:15 +0800 Subject: [PATCH] type: optimize type (#43545) * type: optimize type * Apply suggestions from code review Signed-off-by: afc163 --------- Signed-off-by: afc163 Co-authored-by: afc163 --- components/list/context.ts | 3 ++- components/select/index.tsx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/list/context.ts b/components/list/context.ts index 568a938440..8c0f694363 100644 --- a/components/list/context.ts +++ b/components/list/context.ts @@ -1,7 +1,8 @@ import React from 'react'; +import type { ListGridType } from '.'; export interface ListConsumerProps { - grid?: any; + grid?: ListGridType; itemLayout?: string; } diff --git a/components/select/index.tsx b/components/select/index.tsx index d5e1827304..61754110ac 100755 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -165,7 +165,10 @@ const InternalSelect = < prefixCls, }); - const selectProps = omit(props as typeof props & { itemIcon: any }, ['suffixIcon', 'itemIcon']); + const selectProps = omit(props as typeof props & { itemIcon: React.ReactNode }, [ + 'suffixIcon', + 'itemIcon', + ]); const rcSelectRtlDropdownClassName = classNames( popupClassName || dropdownClassName,