UNPKG

508 BTypeScriptView Raw
1import { ComponentClass, ComponentType } from "react";
2import { InjectedFormProps } from "../index";
3
4export function formValues<
5 Values,
6 P = {},
7>(
8 obj: Values,
9): (component: ComponentType<P & { [K in keyof Values]: any }>) => ComponentClass<P & { [K in keyof Values]: any }>;
10
11export function formValues<
12 FormData = {},
13 K extends keyof FormData = keyof FormData,
14 P = {},
15>(...names: K[]): (component: ComponentType<P & Pick<FormData, K>>) => ComponentClass<P & Pick<FormData, K>>;