From 16caa8fc42719ecda67d71002c4f3022a285d7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20B=C3=ADro=C5=A1?= Date: Wed, 23 Aug 2017 07:55:33 +0200 Subject: [PATCH] Added SubmissionError into export for immutabable Added SubmissionError into export in redux-from/immutable/index.d.ts in order to be able to use SubmissionError with immutable store state. In redux-form/lib/SubmissionError.d.ts changed default generic from void to any, in order to be able to use it as is state redux-form docs. http://redux-form.com/7.0.3/examples/submitValidation/ Because there is no way to pass anoter type into generic constructor from real project. --- types/redux-form/immutable/index.d.ts | 1 + types/redux-form/lib/SubmissionError.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/redux-form/immutable/index.d.ts b/types/redux-form/immutable/index.d.ts index 3eacb2338c..fe5cc6904d 100644 --- a/types/redux-form/immutable/index.d.ts +++ b/types/redux-form/immutable/index.d.ts @@ -20,4 +20,5 @@ export { isPristine, isSubmitting, isValid, + SubmissionError } from "redux-form"; diff --git a/types/redux-form/lib/SubmissionError.d.ts b/types/redux-form/lib/SubmissionError.d.ts index ffe7a0064a..790cb8e697 100644 --- a/types/redux-form/lib/SubmissionError.d.ts +++ b/types/redux-form/lib/SubmissionError.d.ts @@ -1,7 +1,7 @@ import { FormErrors } from "redux-form"; -export interface SubmissionErrorConstructor { +export interface SubmissionErrorConstructor { new (errors?: FormErrors): Error; } -declare const SubmissionError: SubmissionErrorConstructor; +declare const SubmissionError: SubmissionErrorConstructor;