You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import * as React from 'react';
|
|
|
|
import * as hoistNonReactStatics from 'hoist-non-react-statics';
|
|
|
|
import { Omit } from '../_util/type';
|
|
|
|
import { FormComponentProps } from './Form';
|
|
|
|
|
|
|
|
// Copy from @types/react-redux https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-redux/index.d.ts
|
|
|
|
export type ConnectedComponentClass<
|
|
|
|
C extends React.ComponentType<any>,
|
|
|
|
P
|
|
|
|
> = React.ComponentClass<JSX.LibraryManagedAttributes<C, P>> & hoistNonReactStatics.NonReactStatics<C> & {
|
|
|
|
WrappedComponent: C;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type FormWrappedProps<TOwnProps extends FormComponentProps> =
|
|
|
|
<
|
|
|
|
C extends React.ComponentType
|
|
|
|
>(component: C)
|
|
|
|
=> ConnectedComponentClass<C, Omit<TOwnProps, keyof FormComponentProps>>;
|