diff --git a/types/redux-form/index.d.ts b/types/redux-form/index.d.ts index bbddfbd744..dd5572cac0 100644 --- a/types/redux-form/index.d.ts +++ b/types/redux-form/index.d.ts @@ -10,6 +10,7 @@ // Ethan Resnick // Tim de Koning // Maddi Joyce +// Kamil Wojcik // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import { diff --git a/types/redux-form/lib/reduxForm.d.ts b/types/redux-form/lib/reduxForm.d.ts index 5d0d90d7b8..e37214f5d0 100644 --- a/types/redux-form/lib/reduxForm.d.ts +++ b/types/redux-form/lib/reduxForm.d.ts @@ -111,7 +111,7 @@ export interface ConfigProps { initialValues?: Partial; keepDirtyOnReinitialize?: boolean; updateUnregisteredFields?: boolean; - onChange?(values: Partial, dispatch: Dispatch, props: P & InjectedFormProps): void; + onChange?(values: Partial, dispatch: Dispatch, props: P & InjectedFormProps, previousValues: Partial): void; onSubmit?: FormSubmitHandler, ErrorType> | SubmitHandler, ErrorType>; onSubmitFail?( errors: FormErrors | undefined, diff --git a/types/redux-form/redux-form-tests.tsx b/types/redux-form/redux-form-tests.tsx index 3d177a7a8f..fc6e97fb6a 100644 --- a/types/redux-form/redux-form-tests.tsx +++ b/types/redux-form/redux-form-tests.tsx @@ -231,6 +231,14 @@ const testFormWithInitialValuesAndValidationDecorator = reduxForm({ + form: "testWithValidation", + onChange: (values: Partial, + dispatch: Dispatch, + props: TestFormComponentProps & InjectedFormProps, + previousValues: Partial) => {} +}); + type TestProps = {} & InjectedFormProps; const Test = reduxForm({ form : "test"