UNPKG

1.33 kBTypeScriptView Raw
1import { Integration } from '@sentry/types';
2/** JSDoc */
3interface GlobalHandlersIntegrations {
4 onerror: boolean;
5 onunhandledrejection: boolean;
6}
7/** Global handlers */
8export declare class GlobalHandlers implements Integration {
9 /**
10 * @inheritDoc
11 */
12 static id: string;
13 /**
14 * @inheritDoc
15 */
16 name: string;
17 /** JSDoc */
18 private readonly _options;
19 /** JSDoc */
20 private _onErrorHandlerInstalled;
21 /** JSDoc */
22 private _onUnhandledRejectionHandlerInstalled;
23 /** JSDoc */
24 constructor(options?: GlobalHandlersIntegrations);
25 /**
26 * @inheritDoc
27 */
28 setupOnce(): void;
29 /** JSDoc */
30 private _installGlobalOnErrorHandler;
31 /** JSDoc */
32 private _installGlobalOnUnhandledRejectionHandler;
33 /**
34 * This function creates a stack from an old, error-less onerror handler.
35 */
36 private _eventFromIncompleteOnError;
37 /**
38 * Create an event from a promise rejection where the `reason` is a primitive.
39 *
40 * @param reason: The `reason` property of the promise rejection
41 * @returns An Event object with an appropriate `exception` value
42 */
43 private _eventFromRejectionWithPrimitive;
44 /** JSDoc */
45 private _enhanceEventWithInitialFrame;
46}
47export {};
48//# sourceMappingURL=globalhandlers.d.ts.map
\No newline at end of file