import { Static } from '@sinclair/typebox'; export type Values = E[keyof E]; /** * Converts an error into a json object * * @param error - Error to convert * @returns An error json */ export declare const jsonifyError: (error: EverclearError | Error) => ErrorJson; export declare const ErrorJsonSchema: import("@sinclair/typebox").TObject<{ message: import("@sinclair/typebox").TString; context: import("@sinclair/typebox").TAny; type: import("@sinclair/typebox").TString; stack: import("@sinclair/typebox").TOptional>; }>; export type ErrorJson = Static; /** * @classdesc The error class used throughout this repo. Defines a context object in addition to the standard message and name fields. The context can hold any information in json form that is relevant to the error * * Is also able to be hydrated from a json */ export declare class EverclearError extends Error { readonly msg: Values; readonly context: any; readonly type: string; readonly level: 'debug' | 'info' | 'warn' | 'error'; readonly isEverclearError = true; static readonly reasons: { [key: string]: string; }; constructor(msg: Values, context?: any, type?: string, level?: 'debug' | 'info' | 'warn' | 'error'); toJson(): ErrorJson; static fromJson(json: ErrorJson): EverclearError; } //# sourceMappingURL=error.d.ts.map