@tarojs/taro 3.6.6-alpha.2 → 3.6.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "3.6.6-alpha.2",
3
+ "version": "3.6.6",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -21,11 +21,11 @@
21
21
  "author": "O2Team",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@tarojs/api": "3.6.6-alpha.2",
25
- "@tarojs/runtime": "3.6.6-alpha.2"
24
+ "@tarojs/api": "3.6.6",
25
+ "@tarojs/runtime": "3.6.6"
26
26
  },
27
27
  "devDependencies": {
28
- "@tarojs/helper": "3.6.6-alpha.2"
28
+ "@tarojs/helper": "3.6.6"
29
29
  },
30
30
  "peerDependenciesMeta": {
31
31
  "@types/react": {
@@ -40,5 +40,8 @@
40
40
  "vue": {
41
41
  "optional": true
42
42
  }
43
+ },
44
+ "scripts": {
45
+ "test": "echo \"Error: run tests from root\" && exit 1"
43
46
  }
44
47
  }
@@ -18,7 +18,7 @@ declare module '../../../index' {
18
18
  /** 小程序错误事件的回调函数 */
19
19
  type Callback = (
20
20
  /** 错误信息,包含堆栈 */
21
- error: string,
21
+ error: string | ErrorEvent | Error,
22
22
  ) => void
23
23
  }
24
24
 
@@ -113,13 +113,13 @@ declare module '../../../index' {
113
113
  *
114
114
  * **注意**
115
115
  * - 所有的 unhandledRejection 都可以被这一监听捕获,但只有 Error 类型的才会在小程序后台触发报警。
116
- * @supported weapp, tt
116
+ * @supported weapp, tt, h5
117
117
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onUnhandledRejection.html
118
118
  */
119
119
  onUnhandledRejection<T = any>(callback: onUnhandledRejection.Callback<T>): void
120
120
 
121
121
  /** 监听系统主题改变事件。该事件与 [`App.onThemeChange`](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onThemeChange-Object-object) 的回调时机一致。
122
- * @supported weapp
122
+ * @supported weapp, h5
123
123
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onThemeChange.html
124
124
  */
125
125
  onThemeChange(callback: onThemeChange.Callback): void
@@ -131,13 +131,13 @@ declare module '../../../index' {
131
131
  * - 开发者可以在回调中进行页面重定向,但必须在回调中**同步**处理,异步处理(例如 `setTimeout` 异步执行)无效。
132
132
  * - 若开发者没有调用 [Taro.onPageNotFound](/docs/apis/base/weapp/app-event/onPageNotFound) 绑定监听,也没有声明 `App.onPageNotFound`,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。
133
133
  * - 如果回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再第二次回调。
134
- * @supported weapp, h5, tt
134
+ * @supported weapp, tt, h5
135
135
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onPageNotFound.html
136
136
  */
137
137
  onPageNotFound(callback: onPageNotFound.Callback): void
138
138
 
139
139
  /** 监听小程序错误事件。如脚本错误或 API 调用报错等。该事件与 [`App.onError`](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onerrorstring-error) 的回调时机与参数一致。
140
- * @supported weapp, tt
140
+ * @supported weapp, tt, h5
141
141
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onError.html
142
142
  */
143
143
  onError(callback: onError.Callback): void
@@ -178,16 +178,16 @@ declare module '../../../index' {
178
178
  * **注意**
179
179
  *
180
180
  * 部分版本在无`referrerInfo`的时候会返回 `undefined`,建议使用 `options.referrerInfo && options.referrerInfo.appId` 进行判断。
181
- * @supported weapp, h5, tt
181
+ * @supported weapp, tt, h5
182
182
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onAppShow.html
183
183
  */
184
184
  onAppShow(
185
185
  /** 小程序切前台事件的回调函数 */
186
- callback: (result: onAppShow.CallbackResult) => void,
186
+ callback: (res: onAppShow.CallbackResult) => void,
187
187
  ): void
188
188
 
189
189
  /** 监听小程序切后台事件。该事件与 [`App.onHide`](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onhide) 的回调时机一致。
190
- * @supported weapp, h5, tt
190
+ * @supported weapp, tt, h5
191
191
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onAppHide.html
192
192
  */
193
193
  onAppHide(
@@ -196,34 +196,34 @@ declare module '../../../index' {
196
196
  ): void
197
197
 
198
198
  /** 取消监听未处理的 Promise 拒绝事件
199
- * @supported weapp, tt
199
+ * @supported weapp, tt, h5
200
200
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offUnhandledRejection.html
201
201
  */
202
202
  offUnhandledRejection<T = any>(callback: onUnhandledRejection.Callback<T>): void
203
203
 
204
204
  /** 取消监听系统主题改变事件
205
- * @supported weapp
205
+ * @supported weapp, h5
206
206
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offThemeChange.html
207
207
  */
208
208
  offThemeChange(callback: onThemeChange.Callback): void
209
209
 
210
210
  /** 取消监听小程序要打开的页面不存在事件
211
- * @supported weapp, tt
211
+ * @supported weapp, tt, h5
212
212
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offPageNotFound.html
213
213
  */
214
214
  offPageNotFound(
215
215
  /** 小程序要打开的页面不存在事件的回调函数 */
216
- callback: (res: onPageNotFound.Callback) => void,
216
+ callback: onPageNotFound.Callback,
217
217
  ): void
218
218
 
219
219
  /** 取消监听音频播放错误事件
220
- * @supported weapp, tt
220
+ * @supported weapp, tt, h5
221
221
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/InnerAudioContext.offError.html
222
222
  */
223
223
 
224
224
  offError(
225
225
  /** 音频播放错误事件的回调函数 */
226
- callback: (res: onError.Callback) => void,
226
+ callback: onError.Callback,
227
227
  ): void
228
228
 
229
229
  /** 取消监听音频中断结束事件
@@ -245,21 +245,21 @@ declare module '../../../index' {
245
245
  ): void
246
246
 
247
247
  /** 取消监听小程序切前台事件
248
- * @supported weapp, h5, tt
248
+ * @supported weapp, tt, h5
249
249
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offAppShow.html
250
250
  */
251
251
  offAppShow(
252
252
  /** 小程序切前台事件的回调函数 */
253
- callback: (res: TaroGeneral.CallbackResult) => void,
253
+ callback: (res: onAppShow.CallbackResult) => void,
254
254
  ): void
255
255
 
256
256
  /** 取消监听小程序切后台事件
257
- * @supported weapp, h5, tt
257
+ * @supported weapp, tt, h5
258
258
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offAppHide.html
259
259
  */
260
260
  offAppHide(
261
261
  /** 小程序切后台事件的回调函数 */
262
- callback: (res: TaroGeneral.CallbackResult) => void,
262
+ callback: (res: onAppHide.CallbackResult) => void,
263
263
  ): void
264
264
  }
265
265
  }
@@ -85,7 +85,7 @@ declare module '../index' {
85
85
 
86
86
  /**
87
87
  * 小程序有未处理的 Promise reject 时触发。也可以使用 Taro.onUnhandledRejection 绑定监听。
88
- * @supported weapp, alipay
88
+ * @supported weapp, alipay, h5
89
89
  */
90
90
  useUnhandledRejection(callback: (error: { reason: Error, promise: Promise<Error> }) => void): void
91
91