UNPKG

871 BTypeScriptView Raw
1import type { Client } from '@sentry/core';
2type UnhandledRejectionMode = 'none' | 'warn' | 'strict';
3interface OnUnhandledRejectionOptions {
4 /**
5 * Option deciding what to do after capturing unhandledRejection,
6 * that mimicks behavior of node's --unhandled-rejection flag.
7 */
8 mode: UnhandledRejectionMode;
9}
10/**
11 * Add a global promise rejection handler.
12 */
13export declare const onUnhandledRejectionIntegration: (options?: Partial<OnUnhandledRejectionOptions> | undefined) => import("@sentry/core").Integration;
14/**
15 * Send an exception with reason
16 * @param reason string
17 * @param promise promise
18 *
19 * Exported only for tests.
20 */
21export declare function makeUnhandledPromiseHandler(client: Client, options: OnUnhandledRejectionOptions): (reason: unknown, promise: unknown) => void;
22export {};
23//# sourceMappingURL=onunhandledrejection.d.ts.map
\No newline at end of file