Skip to content

Commit 5f7fabe

Browse files
fix(deps): Update dependency @hookform/resolvers to v5.2.0 (#438)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Sergio Martin Sanchez <sergio.anger@gmail.com>
1 parent 85245bc commit 5f7fabe

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hooks/useI18nForm.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@ import { zodResolver } from '@hookform/resolvers/zod';
33
import { useEffect, useMemo } from 'react';
44
import { useForm, type FieldValues, type UseFormProps, type UseFormReturn } from 'react-hook-form';
55
import { useTranslation } from 'react-i18next';
6-
import type { ZodType, ZodTypeDef } from 'zod';
76

8-
type SchemaBuilder<TFormInput, TFormOutput> = (t: NotifycalTFunction) => ZodType<TFormOutput, ZodTypeDef, TFormInput>;
7+
// Workaround while we update to Zod 4
8+
interface Zod3Type<O = unknown, I = unknown> {
9+
_output: O;
10+
_input: I;
11+
_def: {
12+
typeName: string;
13+
};
14+
}
15+
16+
type SchemaBuilder<TFormInput, TFormOutput> = (t: NotifycalTFunction) => Zod3Type<TFormOutput, TFormInput>;
917

1018
// Replicating react-hook-form useForm signature generics (including order)
1119
export function useI18nForm<

0 commit comments

Comments
 (0)