export declare enum ActionType {
    SET_VALUE = 0,
    SET_ERROR = 1,
    SET_TOUCHED = 2,
    SET_IS_SUBMITTING = 3,
    RESET = 4
}
export type Errors<T> = Partial<Record<keyof T, string>>;
export type FormState<T> = {
    values: T;
    errors: Partial<Errors<T>>;
    touched: Partial<Record<keyof T, boolean>>;
    isSubmitting: boolean;
};
export type Action<T> = {
    type: ActionType.SET_VALUE;
    field: keyof T;
    value: any;
} | {
    type: ActionType.SET_ERROR;
    field: keyof T;
    error: string;
} | {
    type: ActionType.SET_TOUCHED;
    field: keyof T;
    touched: boolean;
} | {
    type: ActionType.RESET;
    initialValues: T;
} | {
    type: ActionType.SET_IS_SUBMITTING;
    isSubmitting: boolean;
};
export declare function formReducer<T>(state: FormState<T>, action: Action<T>): FormState<T>;
