No explicit any
This commit is contained in:
@@ -15,7 +15,8 @@ function formatErrors(errors: z.ZodFormattedError<Map<string, string>, string>)
|
||||
return Object.entries(errors)
|
||||
.map(([name, value]) => {
|
||||
if (value && "_errors" in value) {
|
||||
return `${name}: ${(value as any)._errors.join(", ")}`;
|
||||
const errs = (value as z.ZodFormattedError<string>)._errors;
|
||||
return `${name}: ${errs.join(", ")}`;
|
||||
}
|
||||
return `${name}: invalid`;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user