import { AxiosResponse } from 'axios'; declare type Optional = T | undefined | null; declare type TPromiseOn = Optional<(_: T) => R | PromiseLike>; export declare abstract class APIPromise implements PromiseLike { promise: Promise; constructor(req: Promise>); then(onRsv?: TPromiseOn, onRjt?: TPromiseOn): Promise; catch(onRjt: TPromiseOn): Promise; abstract onResponse(res: AxiosResponse): T; onSuccess(f: Optional<(x: U) => V>, v: U): U | V; onFail(f: Optional<(x: U) => V>, v: U): V; } export {};