UNPKG

react-native-healthkit-bridge

Version:

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

17 lines (16 loc) 977 B
import { HealthKitError } from '../core/types/HealthKitTypes'; import { HealthKitErrorCode } from '../config/healthkit.config'; export declare class HealthKitErrorHandler { static createError(code: HealthKitErrorCode, message?: string, context?: string, details?: any): HealthKitError; static handle(error: any, context: string): HealthKitError; static isHealthKitError(error: any): error is HealthKitError; static isNetworkError(error: any): boolean; static isAuthorizationError(error: any): boolean; static isTimeoutError(error: any): boolean; static isValidationError(error: any): boolean; static isQueryError(error: any): boolean; static formatError(error: HealthKitError): string; static logError(error: HealthKitError, level?: 'debug' | 'info' | 'warn' | 'error'): void; static throwError(error: HealthKitError): never; static withErrorHandling<T>(operation: () => Promise<T>, context: string, fallback?: T): Promise<T>; }