type Safe<T> = {
    success: true;
    data: T;
} | {
    success: false;
    error: string;
};
interface SafeOptions<E = unknown> {
    errorMessage?: string;
    processError?: (error: E) => string;
}
declare function safe<T, E = unknown>(promise: Promise<T>, options?: SafeOptions<E>): Promise<Safe<T>>;
declare function safe<T, E = unknown>(func: () => T, options?: SafeOptions<E>): Safe<T>;
export { type Safe, type SafeOptions, safe };
