import { UmbApiError, UmbCancelError } from './umb-error.js'; import { UmbControllerBase } from '../../../libs/class-api/index.js'; import type { UmbControllerHost } from '../../../libs/controller-api/index.js'; export declare class UmbResourceController extends UmbControllerBase { /** * The promise that is being executed. * @protected */ protected _promise: PromiseLike; constructor(host: UmbControllerHost, promise: PromiseLike, alias?: string); /** * Maps any error to an UmbError. * @internal * @param {*} error The error to map * @returns {*} The mapped error */ mapToUmbError(error: unknown): UmbApiError | UmbCancelError; /** * Cancel all resources that are currently being executed by this controller if they are cancelable. * * This works by checking if the promise is a CancelablePromise and if so, it will call the cancel method. * * This is useful when the controller is being disconnected from the DOM. * @see CancelablePromise * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortController */ cancel(): void; hostDisconnected(): void; destroy(): void; protected _peekError(headline: string, message: string, details: unknown): Promise; }