From a82713effd7274e100ecf8ce30abc440a8e0f5c9 Mon Sep 17 00:00:00 2001 From: Reaper Gelera Date: Tue, 28 May 2024 00:04:41 +0530 Subject: [PATCH] fix: fieldErrors keys autocomplete --- src/atomWithFormControls.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/atomWithFormControls.ts b/src/atomWithFormControls.ts index a3816b7..723410e 100644 --- a/src/atomWithFormControls.ts +++ b/src/atomWithFormControls.ts @@ -1,4 +1,4 @@ -import { WritableAtom, atom } from 'jotai/vanilla'; +import { atom, WritableAtom } from 'jotai/vanilla'; import type { ExtractTypeOfValidatorValue, Validator, @@ -19,7 +19,7 @@ export type ActionableNext = { export type FormControls = { isValid: boolean; fieldErrors: { - [k: string]: any; + [k in Keys]: Error; }; touched: Record; focused: Record;