export declare class Future extends Promise { resolve: (value: T) => void; reject: (reason: any) => void; resolving: boolean; private _resolved; private _rejected; private onAborted; constructor(executor: (resolve: (value: T) => void, reject: (reason?: any) => void, onAborted: (cb: (reason?: any) => void) => void) => void); /** * Handles success / rejection from Promise and returns the result as an object. * If the promise is rejected, the error will be in the error property. * No need to try/catch the promise when using this method. * * @return {*} {Future<{ success?: T, error?: Error; }>} * @memberof Future */ tryCatch(): Future<[success: T, error: Error]>; unwrapAxiosApiResponse(): Future; unwrap(executor: (value: T, resolve: (value: T2) => void, reject: (reason?: any) => void) => void): Future; /** * Expose abort for other future to use. * chain method for future * @param onAbort */ abortIf(onAbort: (cb: (reason?: any) => void) => void): this; /** * Aborts the request * * @param {*} [reason] * @memberof Future */ abort(reason?: any): void; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. * @param values An array of Promises. * @returns A new Promise. */ static all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; get resolved(): boolean; get rejected(): boolean; static get [Symbol.species](): PromiseConstructor; get [Symbol.toStringTag](): string; static new(): Future; } export declare class ResponsePromise extends Promise { cancelCb: (() => void); constructor(executor: any); cancel(): void; }