/**
 * Process uncaught error.
 *
 * It will wait for:
 * - EventBus cleanup;
 * - LoggerService flush and cleanup.
 *
 * You may not need to cleanup classes above when using this.
 *
 * @deprecated Use GracefulShutdownService instead. It will be removed in the next major version.
 * @param {() => Promise<number>} beforeExit
 * @param {number} exitCode Used when beforeExit is not provided. Default is 0.
 * @returns The callback function.
 * @since 5.1.0
 * @author Caique Araujo <caique@piggly.com.br>
 */
export declare const processUncaught: (beforeExit?: () => Promise<number>, exitCode?: number) => (reason: any, origin: any) => Promise<never>;
