Skip to content

Commit 015883a

Browse files
authored
fix(core): resolve 'Excessive stack depth comparing types' error (#52)
1 parent 009ff62 commit 015883a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/composables/useForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ type FormMessage<Values extends FormValues> =
103103
type: ACTION_TYPE.SET_FIELD_ERROR;
104104
payload: {
105105
path: string;
106-
error: FormErrors<PathValue<Values, Path<Values>>> | string | string[];
106+
error: FieldError<PathValue<Values, Path<Values>>> | string | string[];
107107
};
108108
}
109109
| { type: ACTION_TYPE.SET_ISSUBMITTING; payload: boolean }

packages/core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export type UseFormSetFieldError<Values extends FormValues> = <
111111
Name extends Path<Values>,
112112
>(
113113
name: Name,
114-
error: FormErrors<PathValue<Values, Name>> | string | string[],
114+
error: FieldError<PathValue<Values, Name>> | string | string[],
115115
) => void;
116116

117117
export interface FormResetState<Values extends FormValues = FormValues> {

0 commit comments

Comments
 (0)