With a new empty project when creating a form with the Zod validator, TypeScript will throw "Type instantiation is excessively deep and possibly infinite". This is without any extra type information being extracted to feed into the form, so it could be due to type inference.
import { createForm } from 'felte';
import { validator } from '@felte/validator-zod';
import * as z from 'zod';
const schema = z.object({
email: z.string().email().nonempty(),
password: z.string().nonempty(),
});
const { form } = createForm({
validate: validator({ schema }),
});
Running into the same issue with Solid. Tried to fix but with no luck, from my investigation the actual error was caused by the Extender type, which is weird since it is also used in other validators, like yup
Describe the bug
With a new empty project when creating a form with the Zod validator, TypeScript will throw "Type instantiation is excessively deep and possibly infinite". This is without any extra type information being extracted to feed into the form, so it could be due to type inference.
Which package/s are you using?
felte (Svelte), @felte/validator-zod
Environment
To reproduce
Install the dependencies, copy the code snippet into a fresh TS project, and run TS typechecking.
Small reproduction example
No response
Screenshots
No response
Additional context
No response