Skip to content

Commit 4c06b13

Browse files
Jephufferikras
authored andcommitted
config not generic + pass form values to config (#57)
1 parent 8a998f5 commit 4c06b13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface FormRenderProps<S> extends FormState<S> {
1515
) => Promise<object | undefined> | undefined
1616
}
1717

18-
interface FormConfig extends Config {
18+
interface FormConfig<FormValues> extends Config<FormValues> {
1919
subscription?: FormSubscription
2020
initialValuesEqual?: (a: object, b: object) => boolean
2121
}
@@ -38,7 +38,7 @@ export interface FieldRenderProps<V = any, T = string> {
3838
}
3939

4040
declare module 'react-final-form-hooks' {
41-
export function useForm<C = FormConfig, S = object>(config: C): FormRenderProps<S>
41+
export function useForm<S = object>(config: FormConfig<S>): FormRenderProps<S>
4242
export function useFormState<S = object>(
4343
form: FormApi<S>,
4444
subscription?: FormSubscription

0 commit comments

Comments
 (0)