export declare class BaseError extends Error {
protected code: number;
protected payload: object;
constructor(name: string, message?: string, code?: number, payload?: object);
static toJSON(error: BaseError): object;
static toString(error: BaseError): string;
}