You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should be able to set a root error for the array field without typescript complaining.
What browsers are you seeing the problem on?
No response
Relevant log output
Type '{ message: string; type: string; }' is not assignable to type'Record<string, Partial<{ type: string | number; message: string; }>> & Partial<{ type: string | number; message: string; }>'.
Type '{ message: string; type: string; }' is not assignable to type'Record<string, Partial<{ type: string | number; message: string; }>>'.
Property 'message' is incompatible with index signature.
Type 'string' has no properties in common with type'Partial<{ type: string | number; message: string; }>'.typescript(2322)
errors.d.ts(33, 5): The expected type comes from property 'root' which is declared here on type'FieldErrors<GroupsSchemaType>'
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Version Number
7.51.4
Codesandbox/Expo snack
(EDIT: link was too long, sorry)
https://codesandbox.io/p/sandbox/typebox-experiments-forked-fsw7mn
Steps to reproduce
Try to create custom errors that match the
FieldErrors<T>
signature:Expected behaviour
I should be able to set a
root
error for the array field without typescript complaining.What browsers are you seeing the problem on?
No response
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: