chore: improvement type

This commit is contained in:
wuxh 2023-09-18 14:03:18 +08:00
parent f1a9aa59b2
commit 159e3dc754
No known key found for this signature in database
GPG Key ID: 464F03149513C20C

View File

@ -2,7 +2,7 @@ import useMergedState from 'rc-util/lib/hooks/useMergedState';
import * as React from 'react';
import ConfigProvider, { ConfigContext } from '../config-provider';
export function withPureRenderTheme(Component: any) {
export function withPureRenderTheme<T extends React.FC>(Component: T): T {
return function PureRenderThemeComponent(props: any) {
return (
<ConfigProvider
@ -16,7 +16,7 @@ export function withPureRenderTheme(Component: any) {
<Component {...props} />
</ConfigProvider>
);
};
} as T;
}
export interface BaseProps {