import type { UmbApiResponse, UmbTryExecuteOptions } from '../types.js'; import type { UmbControllerHost } from '../../../../libs/controller-api/index.js'; /** * Make a request and handle errors. * @param {UmbControllerHost} host The host to use for the request and where notifications will be shown. * @param {Promise} promise The promise to execute. * @param {UmbTryExecuteOptions} opts Options for the request. * @returns {Promise>} A promise that resolves with the response data or rejects with an error. * @template T The type of the response data. * @example * const { data, error } = await tryExecute(this, myPromise, { * abortSignal: myAbortSignal, * disableNotifications: false, * }); * if (!error) { * console.log('Success:', data); * } */ export declare function tryExecute(host: UmbControllerHost, promise: Promise, opts?: UmbTryExecuteOptions): Promise>;