import type { SerializedError } from "./error-proto.d.ts"; interface JsonError extends Error { toJSON: () => SerializedError; } export type Options = { exclude?: string[]; maxDepth?: number; useToJSON?: boolean; }; /** * Serialize an `Error` object into a plain object. */ export declare const serialize: (error: AggregateError | Error | JsonError, options?: Options) => SerializedError; export {};