export type TryCatchResponse = [T, null] | [null, E]; export type TryCatchOpts = { logError?: boolean; }; /** * Executes a function or a promise and returns a tuple with the result or the error. * * This allows for a cleaner error handling pattern without the need for try-catch blocks. * * @template T The type of the result. * @template E The type of the error. * @param {Promise | (() => T | Promise)} promiseOrFn - The promise or function to execute. * @param {TryCatchOpts} [options] - Optional configuration for the tryCatch block. * @returns {Promise>} - A promise that resolves to a tuple containing the result and the error. */ export declare function tryCatch(promiseOrFn: Promise | (() => T | Promise), options?: TryCatchOpts): Promise>;