@sentry/node
Version:
Official Sentry SDK for Node.js
25 lines • 937 B
TypeScript
import type { Client, Integration, IntegrationClass } from '@sentry/types';
type UnhandledRejectionMode = 'none' | 'warn' | 'strict';
interface OnUnhandledRejectionOptions {
/**
* Option deciding what to do after capturing unhandledRejection,
* that mimicks behavior of node's --unhandled-rejection flag.
*/
mode: UnhandledRejectionMode;
}
/** Global Promise Rejection handler */
export declare const OnUnhandledRejection: IntegrationClass<Integration & {
setup: (client: Client) => void;
}> & (new (options?: Partial<{
mode: UnhandledRejectionMode;
}>) => Integration);
/**
* Send an exception with reason
* @param reason string
* @param promise promise
*
* Exported only for tests.
*/
export declare function makeUnhandledPromiseHandler(client: Client, options: OnUnhandledRejectionOptions): (reason: unknown, promise: unknown) => void;
export {};
//# sourceMappingURL=onunhandledrejection.d.ts.map