UNPKG

react-pp-bundle

Version:

Polaris组件库扩展包

21 lines (20 loc) 720 B
import { AxiosRequestConfig, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from 'axios'; export interface Result<T = any> { code: number; data: T; msg: string; } declare function createRequest(baseConfig: CreateAxiosDefaults<any>, interceptors?: { request?: (config: InternalAxiosRequestConfig<any>) => any; response?: (config: AxiosResponse) => any; }): { request: <T = any>(config: AxiosRequestConfig) => Promise<Result<T>>; ctx: { pending: Map<any, any>; removePending: (config: any) => void; clearPending: () => void; addPending: (config: any) => void; }; }; export default createRequest; //# sourceMappingURL=createRequest.d.ts.map