UNPKG

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