Browse Source

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>
bump-image
thinkasany 1 year ago
committed by GitHub
parent
commit
c51031ae53
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      components/list/context.ts
  2. 5
      components/select/index.tsx

3
components/list/context.ts

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

5
components/select/index.tsx

@ -165,7 +165,10 @@ const InternalSelect = <
prefixCls, 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( const rcSelectRtlDropdownClassName = classNames(
popupClassName || dropdownClassName, popupClassName || dropdownClassName,

Loading…
Cancel
Save