import type { DefaultEnvironment } from '../types';
/**
 * Process uncaught error.
 *
 * It will wait for:
 * - EventBus cleanup;
 * - LoggerService flush and cleanup.
 *
 * You may not need to cleanup classes above when using this.
 *
 * @param {Environment} env
 * @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: <Environment extends DefaultEnvironment>(env: Environment, beforeExit?: () => Promise<number>, exitCode?: number) => (reason: any, origin: any) => Promise<never>;
