import type { NativeModule, Platform } from 'react-native'; import type { StackFrame } from 'react-native/Libraries/Core/Devtools/parseErrorStack'; import type { NonFatalErrorLevel } from '../utils/Enums'; export interface CrashData { message: string; e_message: string; e_name: string; os: (typeof Platform)['OS']; platform: 'react_native'; exception: StackFrame[]; } export interface CrashReportingNativeModule extends NativeModule { setEnabled(isEnabled: boolean): void; sendJSCrash(data: CrashData | string): Promise; sendHandledJSCrash(data: CrashData | string, userAttributes?: Record | null, fingerprint?: string | null, nonFatalExceptionLevel?: NonFatalErrorLevel | null): Promise; setNDKCrashesEnabled(isEnabled: boolean): Promise; } export declare const NativeCrashReporting: CrashReportingNativeModule;