z-react-dynamic-form
Version:
A dynamic form builder for React applications with various input types and validation
16 lines (15 loc) • 568 B
TypeScript
export declare enum ERRORTYPE {
TOAST = "toast",
FORM = "form",
DISPLAY = "display",
MODAL = "modal",
AUTHENTICATION = "authentication_error",
NOT_ALLOWED = "not_allowed",
FORBIDEN = "forbiden",
NOT_PERMIT = "not_permit"
}
export type errorHandlertType = "auth" | "display" | "forbiden" | "modal" | "form" | "not_allowed" | "not_permit" | "toast";
declare function useCatchErrorHandler(): (error: any, onAction?: (data: any, type: errorHandlertType) => void) => void | {
type: errorHandlertType;
};
export { useCatchErrorHandler };