diff --git a/src/Select.tsx b/src/Select.tsx index 72c33317a..391f8e976 100644 --- a/src/Select.tsx +++ b/src/Select.tsx @@ -95,6 +95,8 @@ export type SelectHandler void) | ((value: ValueType, option: OptionType) => void); +type ArrayElementType = T extends (infer E)[] ? E : T; + export interface SelectProps extends BaseSelectPropsWithoutPrivate { prefixCls?: string; @@ -113,8 +115,8 @@ export interface SelectProps>> Select - onSelect?: SelectHandler; - onDeselect?: SelectHandler; + onSelect?: SelectHandler, OptionType>; + onDeselect?: SelectHandler, OptionType>; // >>> Options /**