Merge pull request #14566 from omerb/master

[redux-form] Add missing asyncValidate argument and update documentation accordingly
This commit is contained in:
Mine Starks
2017-03-06 16:53:36 -08:00
committed by GitHub
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
// Type definitions for redux-form v6.3.1
// Type definitions for redux-form v6.3.3
// Project: https://github.com/erikras/redux-form
// Definitions by: Carson Full <https://github.com/carsonf>, Daniel Lytkin <https://github.com/aikoven>
// Definitions by: Carson Full <https://github.com/carsonf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
+5 -5
View File
@@ -48,14 +48,14 @@ export interface Config<FormData extends DataShape, P, S> {
asyncBlurFields?: string[];
/**
* a function that takes all the form values, the dispatch function, and
* the props given to your component, and returns a Promise that will
* resolve if the validation is passed, or will reject with an object of
* validation errors in the form { field1: <String>, field2: <String> }.
* a function that takes all the form values, the dispatch function,
* the props given to your component and the current blurred field,
* and returns a Promise that will resolve if the validation is passed,
* or will reject with an object of validation errors in the form { field1: <String>, field2: <String> }.
*
* See Asynchronous Blur Validation Example for more details.
*/
asyncValidate?(values: FormData, dispatch: Dispatch<S>, props: P): Promise<any>;
asyncValidate?(values: FormData, dispatch: Dispatch<S>, props: P, blurredField: string): Promise<any>;
/**
* Whether or not to automatically destroy your form's state in the Redux