type: optimize type (#43545)

* type: optimize type

* Apply suggestions from code review

Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: afc163 <afc163@gmail.com>
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
thinkasany 2023-07-14 13:25:15 +08:00 committed by GitHub
parent 860e58ee6f
commit c51031ae53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,8 @@
import React from 'react';
import type { ListGridType } from '.';
export interface ListConsumerProps {
grid?: any;
grid?: ListGridType;
itemLayout?: string;
}

View File

@ -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,