UNPKG

@getcronit/pylon

Version:

![Pylon cover](https://github.com/user-attachments/assets/c28e49b2-5672-4849-826e-8b2eab0360cc)

15 lines (14 loc) 823 B
import type { ErrorInfo } from './types'; type ErrorStoreData = { error: Error | null; errorInfo: ErrorInfo | null; errorType: 'caught' | 'uncaught' | 'recoverable' | 'identifier' | null; }; export declare function reportError(error: Error, errorInfo: ErrorInfo, errorType: 'caught' | 'uncaught' | 'recoverable' | 'identifier'): void; export declare function clearError(): void; export declare function subscribeToErrors(callback: (data: ErrorStoreData) => void): () => void; export declare function getCurrentError(): ErrorStoreData; export declare const onCaughtErrorProd: (error: Error, errorInfo: ErrorInfo) => void; export declare const onUncaughtErrorProd: (error: Error, errorInfo: ErrorInfo) => void; export declare const onRecoverableErrorProd: (error: Error, errorInfo: ErrorInfo) => void; export {};