interface httpHeader { Authorization?: string; Cookie?: string; "Content-Type"?: string; [props: string]: any } interface httpOption { header?: httpHeader data?: any; timeout?: number; config?: { eventType?: string; }; [props: string]: any } interface createOption extends httpOption { url?: string; baseUrl?: string; method?: string; uploadUrl?: string; downloadUrl?: string; } interface requestType { (option?: httpOption & { url: string }): Promise; (url: string, option?: httpOption): Promise; } interface downloadConfig { header?: httpHeader; filePath: string; [props: string]: any; } interface uploadConfig { header?: httpHeader; filePath: string; name: string; formData: { [props: string]: any; } [props: string]: any; } interface downloadType { (option?: downloadConfig & { url: string }): Promise; (url: string, option?: httpOption): Promise; } interface uploadType { (option?: uploadConfig & { url: string }): Promise; (url: string, option?: httpOption): Promise; } interface wefetch { defaults: { baseUrl: string; uploadUrl: string; downloadUrl: string; } create(options: createOption): wefetch; before: { use(interceptor: (resolveCallback: (request:httpOption & { url: string }) => void, rejectCallback: (reason:any) => void) => void): void }; after: { use(interceptor: (resolveCallback: (response:any) => void, rejectCallback: (reason:any) => void) => void): void }; request: requestType; get: requestType; post: requestType; head: requestType; connect: requestType; put: requestType; delete: requestType; trace: requestType; download: downloadType; upload: uploadType; on(eventType: string, callback: (requestTask: any) => void); abort(eventType: string, callback: () => void); onProcess(eventType: string, callback: (progress: any) => void); retry(times: number, request: requestType, timeout: number): Promise; finally(value?: any): Promise; all(promises?: Promise[]): Promise; promisify(api: any): (option: TConfig) => Promise; } declare const wefetchInstance:wefetch export default wefetchInstance