UNPKG

678 BTypeScriptView Raw
1/**
2 * Provides a global error handler to report errors..
3 */
4import { ReactotronCore } from "reactotron-core-client";
5export interface ErrorStackFrame {
6 fileName: string;
7 functionName: string;
8 lineNumber: number;
9 columnNumber?: number | null;
10}
11export interface TrackGlobalErrorsOptions {
12 veto?: (frame: ErrorStackFrame) => boolean;
13}
14/**
15 * Track global errors and send them to Reactotron logger.
16 */
17declare const trackGlobalErrors: (options?: TrackGlobalErrorsOptions) => (reactotron: ReactotronCore) => {
18 onConnect: () => void;
19 features: {
20 reportError: (error: ExtendedExceptionData) => void;
21 };
22};
23export default trackGlobalErrors;