import type { PostHog } from '../posthog-rn'; import { JsonType, Logger, PostHogEventProperties, ErrorTracking as CoreErrorTracking } from '@posthog/core'; type LogLevel = 'debug' | 'log' | 'info' | 'warn' | 'error'; interface AutocaptureOptions { uncaughtExceptions?: boolean; unhandledRejections?: boolean; console?: boolean | LogLevel[]; } export interface ErrorTrackingOptions { autocapture?: AutocaptureOptions | boolean; } export declare class ErrorTracking { private instance; private errorPropertiesBuilder; private logger; private options; /** * Controls whether autocaptured exceptions are actually sent. * When remote config disables error tracking, this is set to false * so that installed handlers become no-ops. * Defaults to true (don't block locally enabled capture before remote config loads). */ private _autocaptureEnabled; constructor(instance: PostHog, options: ErrorTrackingOptions | undefined, logger: Logger); /** * Called when remote config is loaded. * If errorTracking.autocaptureExceptions is explicitly false, autocapture is disabled. * If it's true or undefined (not yet loaded / not present), autocapture follows local config. */ onRemoteConfig(errorTracking: boolean | { [key: string]: JsonType; } | undefined): void; captureException(input: unknown, additionalProperties: PostHogEventProperties, hint: CoreErrorTracking.EventHint): void; private resolveOptions; private resolveAutocaptureOptions; private resolveConsoleOptions; private autocaptureUncaughtErrors; private autocaptureUnhandledRejections; private autocaptureConsole; private autocapture; } export {};