export interface CliExitOptions { context?: Record; beforeExit?: () => Promise; logger?: { error: (message: string, ...args: any[]) => void; debug: (message: string, ...args: any[]) => void; warn: (message: string, ...args: any[]) => void; }; } /** * Exits the CLI with an error message and optional cleanup. * Supports a beforeExit hook for cleanup operations (e.g., closing database connections). * * @example * ```typescript * await cliExitWithError('Invalid configuration file'); * * // With cleanup * await cliExitWithError(error, { * beforeExit: async () => { * await db.close(); * } * }); * ``` */ export declare const cliExitWithError: (error: Error | string, options?: CliExitOptions) => Promise;