mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
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.
This commit is contained in:
+1
@@ -20,4 +20,5 @@ export {
|
||||
isPristine,
|
||||
isSubmitting,
|
||||
isValid,
|
||||
SubmissionError
|
||||
} from "redux-form";
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { FormErrors } from "redux-form";
|
||||
|
||||
export interface SubmissionErrorConstructor<T = void> {
|
||||
export interface SubmissionErrorConstructor<T> {
|
||||
new (errors?: FormErrors<T>): Error;
|
||||
}
|
||||
|
||||
declare const SubmissionError: SubmissionErrorConstructor;
|
||||
declare const SubmissionError: SubmissionErrorConstructor<any>;
|
||||
|
||||
Reference in New Issue
Block a user