import { ErrorOptions } from './types'; export { type ErrorOptions } from './types'; export declare function errIfNotSet(objOfVarNamesWithValues: Record): void; export declare function err500IfNotSet(objOfVarNamesWithValues: Record): void; export declare function errIfEmptyOrNotSet(objOfVarNamesWithValues: Record): void; export declare function err500IfEmptyOrNotSet(objOfVarNamesWithValues: Record): void; export declare function errXXXIfNotSet(errCode: number, checkEmpty: boolean, objOfVarNamesWithValues: Record): void; export declare function err422IfNotSet(o: Record): void; /** Works natively with sync AND async functions */ export declare function tryCatch(callback: () => T, onErr?: Function): T; export declare const failSafe: typeof tryCatch; export declare class DescriptiveError 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 | 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[]; readonly isDescriptiveError = true; /** This for client usage, and is not used by DescriptiveError. It can be used to mark an error as handled by your system. */ isHandled: boolean; constructor(message: string, options?: ErrorOptions); /** Compute extraInfos and parse options */ parseError(forCli?: boolean): string[]; log(): void; toString(): string; toJSON(): string; }