import { PURCHASES_ERROR_CODE } from "./generated/error-codes"; export { PURCHASES_ERROR_CODE }; /** * Type encapsulating an error in an SDK operation. * @public */ export interface PurchasesError { code: PURCHASES_ERROR_CODE; message: string; /** * @deprecated access readableErrorCode through userInfo.readableErrorCode */ readableErrorCode: string; userInfo: ErrorInfo; underlyingErrorMessage: string; /** * @deprecated use code === Purchases.PURCHASES_ERROR_CODE.PURCHASE_CANCELLED_ERROR instead */ userCancelled: boolean | null; } /** * Type encapsulating extra info on an error in an SDK operation. * @public */ export interface ErrorInfo { readableErrorCode: string; } /** * @internal */ export declare class UninitializedPurchasesError extends Error { constructor(); } /** * @internal */ export declare class UnsupportedPlatformError extends Error { constructor(); } /** * Returns whether the given value is a {@link PurchasesError} thrown by the SDK. * * A value qualifies when its schema matches {@link PurchasesError} and its `code` is one of the * {@link PURCHASES_ERROR_CODE} values. * * @public */ export declare function isPurchasesError(error: unknown): error is PurchasesError;