reactotron-react-native
Version:
A development tool to explore, inspect, and diagnose your React Native apps.
24 lines (23 loc) • 678 B
TypeScript
/**
* Provides a global error handler to report errors..
*/
import { ReactotronCore } from "reactotron-core-client";
export interface ErrorStackFrame {
fileName: string;
functionName: string;
lineNumber: number;
columnNumber?: number | null;
}
export interface TrackGlobalErrorsOptions {
veto?: (frame: ErrorStackFrame) => boolean;
}
/**
* Track global errors and send them to Reactotron logger.
*/
declare const trackGlobalErrors: (options?: TrackGlobalErrorsOptions) => (reactotron: ReactotronCore) => {
onConnect: () => void;
features: {
reportError: (error: ExtendedExceptionData) => void;
};
};
export default trackGlobalErrors;