UNPKG

react-native-healthkit-bridge

Version:

A comprehensive React Native bridge for Apple HealthKit with TypeScript support, advanced authorization, and flexible data queries

27 lines (26 loc) 857 B
export interface RetryConfig { maxAttempts: number; baseDelay: number; maxDelay: number; backoffMultiplier: number; retryableErrors?: string[]; } export interface RetryResult<T> { success: boolean; data?: T; error?: Error; attempts: number; totalTime: number; } export declare class RetryManager { private static instance; private defaultConfig; private constructor(); static getInstance(): RetryManager; withRetry<T>(operation: () => Promise<T>, config?: Partial<RetryConfig>): Promise<RetryResult<T>>; private isRetryableError; private sleep; retryQuery<T>(operation: () => Promise<T>): Promise<T>; retryAuth<T>(operation: () => Promise<T>): Promise<T>; } export declare function withRetry<T>(operation: () => Promise<T>, config?: Partial<RetryConfig>): Promise<RetryResult<T>>;