-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
42 lines (35 loc) · 839 Bytes
/
index.d.ts
File metadata and controls
42 lines (35 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* @Description: Vxios类型描述
* @Author: Gavin
* @Date: 2022-02-09 17:22:30
* @LastEditTime: 2022-02-09 18:51:24
* @LastEditors: Gavin
*/
type rq=<T = any>(url: string, data?: any, config?: any)=>Promise<T>;
type Rquest=<T = any>(config?: any)=>Promise<T>;
export interface Context{
post:rq
connect:rq
delete:rq
get:rq
head:rq
trace:rq
put:rq
mergebase:(newItem:any,base:any)=>any
request:Rquest,
defaults:any
interceptors: {
request: VxiosInterceptorCommon<any>;
response: VxiosInterceptorCommon<any>;
};
}
export interface VxiosInterceptorCommon<V> {
use(onFulfilled?: (value: V) => V | Promise<V>)
}
export interface VxiosInstance extends Context {
context:Context
}
export interface VxiosPublic extends VxiosInstance {
}
declare const Vxios: VxiosPublic;
export default Vxios;