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 am getting a type error because validateForm has two types:
/**
* Validate current form data.
*/
export declare function validateForm<T extends AnyZodObject>(): Promise<SuperValidated<ZodValidation<T>>>;
/**
* Validate a specific field in the form.
*/
export declare function validateForm<T extends AnyZodObject>(path: FormPathLeaves<z.infer<T>>, opts?: ValidateOptions<FormPathType<z.infer<T>, FormPathLeaves<z.infer<T>>>, T>): Promise<string[] | undefined>;
/**
I have a component which expects a superForm to be passed as a param, but I am getting an error:
Type 'SuperForm<ZodObject<{ email: ZodString; locked: ZodOptional<ZodBoolean>; authorities: ZodArray<ZodOptional<ZodNullable<ZodEnum<["ADMIN", "USER", "SHIPMENT", "TRANSPORT", "COMPANY", "TRIGGER", "ACCESS_CODE"]>>>, "many">; }, "strip", ZodTypeAny, { ...; }, { ...; }>, any>' is not assignable to type 'SuperForm<any>'.
Types of property 'validate' are incompatible.
Type 'typeof validateForm<UnwrapEffects<T>>' is not assignable to type 'typeof validateForm<UnwrapEffects<T>>'. Two different types with this name exist, but they are unrelated.
Types of parameters 'path' and 'path' are incompatible.
Type 'string' is not assignable to type 'FormPathLeaves<{ email: string; authorities: ("ADMIN" | "USER" | "SHIPMENT" | "TRANSPORT" | "COMPANY" | "TRIGGER" | "ACCESS_CODE" | null | undefined)[]; locked?: boolean | undefined; }>'.ts(2322)
The text was updated successfully, but these errors were encountered:
Description
I am getting a type error because validateForm has two types:
I have a component which expects a superForm to be passed as a param, but I am getting an error:
The text was updated successfully, but these errors were encountered: