1 | import { Integration } from '@sentry/types';
|
2 |
|
3 | interface GlobalHandlersIntegrations {
|
4 | onerror: boolean;
|
5 | onunhandledrejection: boolean;
|
6 | }
|
7 |
|
8 | export declare class GlobalHandlers implements Integration {
|
9 | |
10 |
|
11 |
|
12 | static id: string;
|
13 | |
14 |
|
15 |
|
16 | name: string;
|
17 |
|
18 | private readonly _options;
|
19 |
|
20 | private _onErrorHandlerInstalled;
|
21 |
|
22 | private _onUnhandledRejectionHandlerInstalled;
|
23 |
|
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 | }
|
47 | export {};
|
48 |
|
\ | No newline at end of file |