@tarojs/taro 3.4.0-beta.3 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/types/api/network/request.d.ts +18 -1
- package/types/taro.extend.d.ts +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "3.4.0
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"author": "O2Team",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@tarojs/api": "3.4.0
|
|
28
|
-
"@tarojs/runtime": "3.4.0
|
|
29
|
-
"@tarojs/taro-h5": "3.4.0
|
|
27
|
+
"@tarojs/api": "3.4.0",
|
|
28
|
+
"@tarojs/runtime": "3.4.0",
|
|
29
|
+
"@tarojs/taro-h5": "3.4.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "a0e97bc937f878cc059f54748c9a3829fa3f4664"
|
|
32
32
|
}
|
|
@@ -231,6 +231,21 @@ declare module '../../index' {
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
type interceptor = (chain: Chain) => any
|
|
235
|
+
|
|
236
|
+
interface Chain {
|
|
237
|
+
index: number
|
|
238
|
+
requestParams: RequestParams
|
|
239
|
+
interceptors: interceptor[]
|
|
240
|
+
proceed(requestParams: RequestParams): any
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface interceptors {
|
|
244
|
+
logInterceptor(chain: Chain): Promise<any>
|
|
245
|
+
|
|
246
|
+
timeoutInterceptor(chain: Chain): Promise<any>
|
|
247
|
+
}
|
|
248
|
+
|
|
234
249
|
interface TaroStatic {
|
|
235
250
|
/** 发起 HTTPS 网络请求。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)。
|
|
236
251
|
*
|
|
@@ -298,6 +313,8 @@ declare module '../../index' {
|
|
|
298
313
|
* ```
|
|
299
314
|
* @since 1.2.16
|
|
300
315
|
*/
|
|
301
|
-
addInterceptor
|
|
316
|
+
addInterceptor(interceptor: interceptor): any
|
|
317
|
+
|
|
318
|
+
interceptors: interceptors
|
|
302
319
|
}
|
|
303
320
|
}
|
package/types/taro.extend.d.ts
CHANGED
|
@@ -13,21 +13,6 @@ declare module './index' {
|
|
|
13
13
|
[propName: string]: any
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
type interceptor = (chain: Chain) => any
|
|
17
|
-
|
|
18
|
-
interface Chain {
|
|
19
|
-
index: number
|
|
20
|
-
requestParams: RequestParams
|
|
21
|
-
interceptors: interceptor[]
|
|
22
|
-
proceed(requestParams: RequestParams): any
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface interceptors {
|
|
26
|
-
logInterceptor(chain: Chain): Promise<any>
|
|
27
|
-
|
|
28
|
-
timeoutInterceptor(chain: Chain): Promise<any>
|
|
29
|
-
}
|
|
30
|
-
|
|
31
16
|
interface Current {
|
|
32
17
|
app: AppInstance | null
|
|
33
18
|
router: RouterInfo | null
|
|
@@ -79,8 +64,6 @@ declare module './index' {
|
|
|
79
64
|
pxTransform(size: number, designWidth?: number): string
|
|
80
65
|
initPxTransform(config: { designWidth: number; deviceRatio: TaroGeneral.TDeviceRatio }): void
|
|
81
66
|
|
|
82
|
-
addInterceptor(interceptor: interceptor): any
|
|
83
|
-
|
|
84
67
|
/**
|
|
85
68
|
* 小程序引用插件 JS 接口
|
|
86
69
|
*/
|