import { ErrorOptions } from './types';
export { type ErrorOptions } from './types';
export declare function errIfNotSet(objOfVarNamesWithValues: any): void;
export declare function err500IfNotSet(objOfVarNamesWithValues: any): void;
export declare function errIfEmptyOrNotSet(objOfVarNamesWithValues: any): void;
export declare function err500IfEmptyOrNotSet(objOfVarNamesWithValues: any): void;
export declare function errXXXIfNotSet(errCode: any, checkEmpty: any, objOfVarNamesWithValues: any): void;
export declare function err422IfNotSet(o: any): void;
/** Works natively with sync AND async functions */
export declare function tryCatch<T>(callback: () => T, onErr?: Function): T;
export declare const failSafe: typeof tryCatch;
export declare class DescriptiveError<ExpectedOriginalError = any> extends Error {
    /** Full error infos, extra infos + message and code...etc as object */
    errorDescription: {
        /** used to uniquely identify the error */
        id: string;
        /** Http error code if any */
        code: number;
        message: string;
        /** The parent error if any */
        originalError?: Error | Record<string, any> | DescriptiveError;
        [k: string]: any;
    };
    /** The parent error if any */
    originalError: ExpectedOriginalError;
    /** used to uniquely identify the error */
    id: string;
    /** Http code. Eg: 404, 403... */
    code?: number;
    message: string;
    options: ErrorOptions;
    /** Logging of the error is async, unless disabled, so that it wait one frame to allow to log it manually */
    hasBeenLogged: boolean;
    isAxiosError: boolean;
    doNotLog: boolean;
    logs: string[];
    constructor(message: string, options?: ErrorOptions);
    /** Compute extraInfos and parse options */
    parseError(forCli?: boolean): string[];
    log(): void;
    toString(): string;
    toJSON(): string;
}
