NullableInput Helper function not working
I'm trying to use the nullableInput helper function that has been shared a few times
However im still getting an error in my onDynamic validator
Type 'File | null' is not assignable to type 'null'.
Type 'File' is not assignable to type 'null'.
Usage example
2 Replies
metropolitan-bronze•3w ago
the helper is one part of it. TypeScript does not know that your defaultValues are
z.input<typeof schema>
so assigning it outside of the hook is both type safer and actually gives it the typeratty-blushOP•3w ago
that worked thankyou!