Skip to content

Commit

Permalink
config not generic + pass form values to config (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jephuff authored and erikras committed Nov 19, 2019
1 parent 8a998f5 commit 4c06b13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface FormRenderProps<S> extends FormState<S> {
) => Promise<object | undefined> | undefined
}

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

declare module 'react-final-form-hooks' {
export function useForm<C = FormConfig, S = object>(config: C): FormRenderProps<S>
export function useForm<S = object>(config: FormConfig<S>): FormRenderProps<S>
export function useFormState<S = object>(
form: FormApi<S>,
subscription?: FormSubscription
Expand Down

0 comments on commit 4c06b13

Please sign in to comment.