export type GlobalErrorType = "uncaughtException" | "unhandledRejection"; export type GlobalErrorHandler = (error: Error, type: GlobalErrorType) => boolean | void; type HandlerFailureReporter = (error: Error, type: GlobalErrorType) => void; /** * Convert an arbitrary thrown value without invoking object conversion hooks. * * Rejected promises and manual event dispatch can carry any JavaScript value. * Calling String(value) is unsafe here because a hostile toString or * Symbol.toPrimitive implementation can throw while the runtime is already * handling a global failure. */ export declare function normalizeGlobalError(value: unknown): Error; /** * Invoke a global error callback while preserving the runtime's fatal default * when the callback itself fails. */ export declare function invokeGlobalErrorHandler(handler: GlobalErrorHandler, error: Error, type: GlobalErrorType, reportFailure?: HandlerFailureReporter): boolean; export {}; //# sourceMappingURL=global-error.d.ts.map