Skip to content

Commit

Permalink
fix(validation-errors): fix FlattenedValidationErrors type
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEdoRan committed Apr 17, 2024
1 parent 77cab3a commit 5f58b9a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/next-safe-action/src/validation-errors.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ export type BindArgsValidationErrors<BAS extends readonly Schema[]> = {
* Type of flattened validation errors. `formErrors` contains global errors, and `fieldErrors`
* contains errors for each field, one level deep.
*/
export type FlattenedValidationErrors<VE extends ValidationErrors<any>> = VE extends undefined
? undefined
: Prettify<{
formErrors: string[];
fieldErrors: {
[K in keyof Omit<VE, "_errors">]?: string[];
};
}>;
export type FlattenedValidationErrors<VE extends ValidationErrors<any>> = Prettify<{
formErrors: string[];
fieldErrors: {
[K in keyof Omit<VE, "_errors">]?: string[];
};
}>;

/**
* Type of flattened bind arguments validation errors.
Expand Down

0 comments on commit 5f58b9a

Please sign in to comment.