/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
/**
 * Plain object representing a serialized error that survives `structuredClone`
 * and `postMessage` across iframe boundaries.
 *
 * The `__type` discriminator allows receivers to distinguish a serialized error
 * from an arbitrary object.
 */
export interface SerializedError {
    readonly __type: 'SerializedError';
    readonly name: string;
    readonly message: string;
    readonly code?: string;
    readonly stack?: string;
    readonly httpStatus?: number;
    readonly details?: unknown;
}
/**
 * Type guard: returns `true` when `value` is a {@link SerializedError}.
 */
export declare function isSerializedError(value: unknown): value is SerializedError;
/**
 * Convert any thrown value into a {@link SerializedError}.
 *
 * Duck-types against known SDK error shapes so callers don't need to import
 * concrete error classes:
 *
 * - `SdkError` instances -> extracts `code`, `details`
 * - Objects with `status: number` -> extracts as `httpStatus` (covers HttpError)
 * - Objects with `responseData` -> extracts as `details` (covers HttpError)
 * - Strings / primitives -> wraps as `{ name: 'Error', message: String(value) }`
 * - Already a `SerializedError` -> returns as-is (idempotent)
 *
 * **Security:** Deliberately omits `HttpError.config` which may contain auth
 * tokens in request headers.
 */
export declare function serializeError(error: unknown): SerializedError;
//# sourceMappingURL=ErrorSerialization.d.ts.map