UNPKG

@visulima/cerebro

Version:

A delightful toolkit for building cross-runtime CLIs for Node.js, Deno, and Bun.

10 lines (9 loc) 499 B
/** * Registers global exception handlers for uncaught exceptions and unhandled promise rejections. * Logs errors using the provided logger and exits the process with code 1. * @template T - Logger type that extends Console interface * @param logger Console-like logger instance for error reporting * @returns Cleanup function to remove event listeners */ declare const registerExceptionHandler: <T extends Console = Console>(logger: T) => () => void; export default registerExceptionHandler;