From 3fb2a3bbcfc79a9d19c400d09937b5d1727a1842 Mon Sep 17 00:00:00 2001 From: Mohamed Shaaban Date: Thu, 10 Jan 2019 14:59:29 +0100 Subject: [PATCH] Fix signature of redux-form `blur` and `change` actions --- types/redux-form/index.d.ts | 1 + types/redux-form/lib/actions.d.ts | 4 ++-- types/redux-form/v6/index.d.ts | 6 +++++- types/redux-form/v6/lib/actions.d.ts | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/types/redux-form/index.d.ts b/types/redux-form/index.d.ts index 5851728369..6915032138 100644 --- a/types/redux-form/index.d.ts +++ b/types/redux-form/index.d.ts @@ -11,6 +11,7 @@ // Tim de Koning // Maddi Joyce // Kamil Wojcik +// Mohamed Shaaban // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 import { diff --git a/types/redux-form/lib/actions.d.ts b/types/redux-form/lib/actions.d.ts index dbe75106e4..955d3d3f5e 100644 --- a/types/redux-form/lib/actions.d.ts +++ b/types/redux-form/lib/actions.d.ts @@ -18,8 +18,8 @@ export declare function arraySplice(form: string, field: string, index: number, export declare function arraySwap(form: string, field: string, indexA: number, indexB: number): FormAction; export declare function arrayUnshift(form: string, field: string, value: any): FormAction; export declare function autofill(form: string, field: string, value: any): FormAction; -export declare function blur(form: string, field: string, value: any): FormAction; -export declare function change(form: string, field: string, value: any): FormAction; +export declare function blur(form: string, field: string, value: any, touch?: boolean): FormAction; +export declare function change(form: string, field: string, value: any, touch?: boolean, persistentSubmitErrors?: boolean): FormAction; export declare function destroy(...form: string[]): FormAction; export declare function focus(form: string, field: string): FormAction; diff --git a/types/redux-form/v6/index.d.ts b/types/redux-form/v6/index.d.ts index 5127457884..63921312b8 100644 --- a/types/redux-form/v6/index.d.ts +++ b/types/redux-form/v6/index.d.ts @@ -1,6 +1,10 @@ // Type definitions for redux-form 6.6 // Project: https://github.com/erikras/redux-form -// Definitions by: Carson Full , Daniel Lytkin , Karol Janyst , Luka Zakrajsek +// Definitions by: Carson Full +// Daniel Lytkin +// Karol Janyst +// Luka Zakrajsek +// Mohamed Shaaban // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 diff --git a/types/redux-form/v6/lib/actions.d.ts b/types/redux-form/v6/lib/actions.d.ts index 7e7ea5762a..2c43296ef5 100644 --- a/types/redux-form/v6/lib/actions.d.ts +++ b/types/redux-form/v6/lib/actions.d.ts @@ -66,12 +66,12 @@ export function autofill(form: string, field: string, value: any): FormAction; /** * Saves the value to the field */ -export function blur(form: string, field: string, value: any): FormAction; +export function blur(form: string, field: string, value: any, touch?: boolean): FormAction; /** * Saves the value to the field */ -export function change(form: string, field: string, value: any): FormAction; +export function change(form: string, field: string, value: any, touch?: boolean, persistentSubmitErrors?: boolean): FormAction; /** * Destroys the form, removing all it's state