From 1713ea4de7903e80e74f5dfb495fb2b88193e87d Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 19 Jan 2024 23:02:35 -0500 Subject: [PATCH] fix(striker-ui): relocate formik utils type --- striker-ui/hooks/useFormikUtils.ts | 10 +--------- striker-ui/types/FormikUtils.d.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/striker-ui/hooks/useFormikUtils.ts b/striker-ui/hooks/useFormikUtils.ts index 344b9c46..c8153bfb 100644 --- a/striker-ui/hooks/useFormikUtils.ts +++ b/striker-ui/hooks/useFormikUtils.ts @@ -7,15 +7,7 @@ import getFormikErrorMessages from '../lib/getFormikErrorMessages'; const useFormikUtils = ( ...formikArgs: Parameters> -): { - disableAutocomplete: ( - overwrite?: Partial, - ) => OutlinedInputProps; - disabledSubmit: boolean; - formik: Formik; - formikErrors: Messages; - handleChange: FormikChangeHandler; -} => { +): FormikUtils => { const [formikConfig, ...restFormikArgs] = formikArgs; const formik = useFormik({ ...formikConfig }, ...restFormikArgs); diff --git a/striker-ui/types/FormikUtils.d.ts b/striker-ui/types/FormikUtils.d.ts index 1a42e51e..f569485e 100644 --- a/striker-ui/types/FormikUtils.d.ts +++ b/striker-ui/types/FormikUtils.d.ts @@ -10,3 +10,15 @@ type FormikChangeHandler = type FormikSubmitHandler = import('formik').FormikConfig['onSubmit']; + +type FormikUtils = { + disableAutocomplete: ( + overwrite?: Partial< + import('../components/OutlinedInput').OutlinedInputProps + >, + ) => import('../components/OutlinedInput').OutlinedInputProps; + disabledSubmit: boolean; + formik: Formik; + formikErrors: Messages; + handleChange: FormikChangeHandler; +};