import type { SerializedError } from '../../error/utils.js';
/**
 * Serializes an Error instance to a plain SerializedError object without
 * mutating the original. Unlike `getErrorFromUnknown(...).toJSON()`, this does
 * not attach a non-enumerable `toJSON` to the live Error.
 */
export declare function serializeError(err: Error, depth?: number): SerializedError;
/**
 * Rehydrates a SerializedError into a vanilla Error instance. We never
 * instantiate user-controlled prototypes — name is preserved as a string field.
 */
export declare function rehydrateError(s: SerializedError): Error;
//# sourceMappingURL=error.d.ts.map