From ae2136136ff752c3b3ad557351e29e52299848a3 Mon Sep 17 00:00:00 2001 From: Forbes Lindesay Date: Wed, 17 Jan 2018 11:07:36 +0000 Subject: [PATCH] Make errors `any` not `boolean` It's unlikely that the errors will ever be a boolean. Typically they are `null | string` but final-form supports `any` value. --- src/index.d.ts | 4 ++-- src/types.js.flow | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index a7177b9d..ca2ff055 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -24,11 +24,11 @@ export interface FieldRenderProps { // TODO: Make a diff of `FieldState` without all the functions active: boolean dirty: boolean - error: boolean + error: any initial: boolean invalid: boolean pristine: boolean - submitError: boolean + submitError: any submitFailed: boolean submitSucceeded: boolean touched: boolean diff --git a/src/types.js.flow b/src/types.js.flow index e1689956..922086fc 100644 --- a/src/types.js.flow +++ b/src/types.js.flow @@ -25,11 +25,11 @@ export type FieldRenderProps = { // TODO: Make a diff of `FieldState` without all the functions active: boolean, dirty: boolean, - error: boolean, + error: any, initial: boolean, invalid: boolean, pristine: boolean, - submitError: boolean, + submitError: any, submitFailed: boolean, submitSucceeded: boolean, touched: boolean,