import BotchedError from './BotchedError'; export interface SerializedErrorObject { name?: string; stack?: string; info?: object; cause?: SerializedErrorObject | null; id?: BotchedError['id']; code?: BotchedError['code']; title?: BotchedError['title']; source?: BotchedError['source']; links?: BotchedError['links']; meta?: BotchedError['meta']; statusCode?: BotchedError['statusCode']; headers?: BotchedError['headers']; isServer?: BotchedError['isServer']; isBotched?: BotchedError['isBotched']; [key: string]: any; } export interface SerializeErrorOptions { maxDepth?: number; fullStack?: boolean; } export interface SerializableError { [key: string]: any; } /** * Create an error serializer * * @param {SerializeErrorOptions} options - use maxDepth -1 for infinite depth * @returns {Function} */ declare function createSerializer(options?: SerializeErrorOptions): (error: Error & Partial) => SerializedErrorObject; export default createSerializer;