mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #14566 from omerb/master
[redux-form] Add missing asyncValidate argument and update documentation accordingly
This commit is contained in:
Vendored
+2
-2
@@ -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
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user