/**
 * A Promise that can be cancelled and provides progress/state tracking
 */
export interface CancellablePromise<T> extends Promise<T> {
    /**
     * Cancel this specific operation
     */
    cancel(): Promise<void>;
    /**
     * Get the underlying AbortController for this operation
     */
    getController(): AbortController | undefined;
    /**
     * Check if this operation is cancelled
     */
    isCancelled(): boolean;
    /**
     * Current progress of the operation (0-1)
     */
    readonly progress: number;
    /**
     * Current status of the operation
     */
    readonly status: string;
    /**
     * Whether the operation is currently running
     */
    readonly isRunning: boolean;
    /**
     * Subscribe to progress updates
     * Returns a dispose function to clean up the subscription
     */
    onProgressUpdate(callback: (progress: number, status: string) => void): () => void;
}
/**
 * Options for creating a cancellable promise with progress tracking
 */
export interface CancellablePromiseOptions<T> {
    promise: Promise<T>;
    abortController?: AbortController;
    cancelFuture?: () => Promise<void>;
    future?: any;
}
/**
 * Create a cancellable promise wrapper with reactive progress tracking
 */
export declare function createCancellablePromise<T>(promise: Promise<T>, abortController?: AbortController, cancelFuture?: () => Promise<void>, future?: any): CancellablePromise<T>;
export declare function createCancellablePromise<T>(options: CancellablePromiseOptions<T>): CancellablePromise<T>;
//# sourceMappingURL=cancellable-promise.d.ts.map