import { AxiosResponse } from 'axios'; declare type ValueOf = T[keyof T]; declare type RHandler = ValueOf<{ [K in keyof T]: T[K] extends (data: any) => infer U ? U : never; }>; export declare class BadResponseError extends Error { res: AxiosResponse; constructor(res: AxiosResponse, label: string); } export declare class APIPromise any; }, KOn extends keyof TRes = keyof TRes> implements PromiseLike> { private handlers; private promise; constructor(resPromise: Promise, stps: { [K in keyof TRes]: (data: any) => TRes[K]; }, handlers: THdl); static init(res: Promise, stps: { [K in keyof TRes]: (data: any) => TRes[K]; }, kRsvs: KRsv[]): APIPromise TRes[K]; }>; on(status: KK, handler: (data: TRes[KK]) => URst): APIPromise K extends KK ? URst : K extends keyof THdl ? ReturnType : never; }, Exclude>; then(onRsv?: (value: RHandler) => RRsv | PromiseLike, onRjt?: (reason: any) => RRjt | PromiseLike): Promise; catch(onRjt: (reason: any) => RRjt | PromiseLike): Promise; } export {};