import { flatten } from "https://deno.land/x/valibot@v1.0.0-beta.7/src/methods/index.ts";
Flatten the error messages of issues.
Type Parameters
TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>
Parameters
issues: [InferIssue<TSchema>, ...InferIssue<TSchema>[]]
The list of issues.
Returns
A flat error object.