@tarojs/taro 3.3.13 → 3.3.14

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.
Files changed (97) hide show
  1. package/package.json +5 -5
  2. package/types/api/ad/index.d.ts +34 -28
  3. package/types/api/alipay/index.d.ts +11 -7
  4. package/types/api/base/debug.d.ts +60 -54
  5. package/types/api/base/env.d.ts +12 -8
  6. package/types/api/base/index.d.ts +87 -83
  7. package/types/api/base/system.d.ts +59 -54
  8. package/types/api/base/update.d.ts +37 -33
  9. package/types/api/base/weapp/app-event.d.ts +147 -131
  10. package/types/api/base/weapp/life-cycle.d.ts +14 -10
  11. package/types/api/canvas/index.d.ts +115 -110
  12. package/types/api/cloud/index.d.ts +99 -94
  13. package/types/api/data-analysis/index.d.ts +68 -64
  14. package/types/api/device/accelerometer.d.ts +57 -50
  15. package/types/api/device/battery.d.ts +19 -15
  16. package/types/api/device/ble.d.ts +241 -228
  17. package/types/api/device/bluetooth.d.ts +207 -194
  18. package/types/api/device/clipboard.d.ts +48 -43
  19. package/types/api/device/compass.d.ts +55 -48
  20. package/types/api/device/contact.d.ts +13 -9
  21. package/types/api/device/gyroscope.d.ts +41 -35
  22. package/types/api/device/iBeacon.d.ts +79 -73
  23. package/types/api/device/motion.d.ts +42 -37
  24. package/types/api/device/network.d.ts +48 -42
  25. package/types/api/device/nfc.d.ts +105 -96
  26. package/types/api/device/performance.d.ts +22 -18
  27. package/types/api/device/phone.d.ts +20 -15
  28. package/types/api/device/scan.d.ts +31 -26
  29. package/types/api/device/screen.d.ts +74 -67
  30. package/types/api/device/vibrate.d.ts +31 -25
  31. package/types/api/device/wifi.d.ts +151 -140
  32. package/types/api/ext/index.d.ts +44 -39
  33. package/types/api/files/index.d.ts +219 -209
  34. package/types/api/framework/index.d.ts +25 -20
  35. package/types/api/location/index.d.ts +140 -136
  36. package/types/api/media/audio.d.ts +135 -127
  37. package/types/api/media/background-audio.d.ts +135 -126
  38. package/types/api/media/camera.d.ts +30 -26
  39. package/types/api/media/editor.d.ts +35 -33
  40. package/types/api/media/image.d.ts +161 -150
  41. package/types/api/media/live.d.ts +88 -82
  42. package/types/api/media/map.d.ts +47 -43
  43. package/types/api/media/recorder.d.ts +90 -84
  44. package/types/api/media/video-processing.d.ts +10 -6
  45. package/types/api/media/video.d.ts +63 -58
  46. package/types/api/network/download.d.ts +34 -30
  47. package/types/api/network/mdns.d.ts +104 -91
  48. package/types/api/network/request.d.ts +83 -79
  49. package/types/api/network/udp.d.ts +20 -16
  50. package/types/api/network/upload.d.ts +60 -56
  51. package/types/api/network/websocket.d.ts +201 -194
  52. package/types/api/open-api/account.d.ts +18 -14
  53. package/types/api/open-api/address.d.ts +27 -23
  54. package/types/api/open-api/authorize.d.ts +30 -26
  55. package/types/api/open-api/card.d.ts +55 -51
  56. package/types/api/open-api/customer-service.d.ts +21 -17
  57. package/types/api/open-api/facial.d.ts +28 -24
  58. package/types/api/open-api/invoice.d.ts +38 -34
  59. package/types/api/open-api/login.d.ts +56 -52
  60. package/types/api/open-api/navigate.d.ts +79 -75
  61. package/types/api/open-api/payment.d.ts +34 -30
  62. package/types/api/open-api/settings.d.ts +49 -45
  63. package/types/api/open-api/soter.d.ts +92 -86
  64. package/types/api/open-api/subscribe-message.d.ts +24 -20
  65. package/types/api/open-api/user-info.d.ts +60 -57
  66. package/types/api/open-api/werun.d.ts +50 -46
  67. package/types/api/route/index.d.ts +122 -118
  68. package/types/api/share/index.d.ts +68 -64
  69. package/types/api/storage/background-fetch.d.ts +40 -35
  70. package/types/api/storage/index.d.ts +267 -262
  71. package/types/api/swan/index.d.ts +47 -42
  72. package/types/api/ui/animation.d.ts +21 -17
  73. package/types/api/ui/background.d.ts +38 -34
  74. package/types/api/ui/custom-component.d.ts +22 -18
  75. package/types/api/ui/fonts.d.ts +26 -21
  76. package/types/api/ui/interaction.d.ts +153 -149
  77. package/types/api/ui/keyboard.d.ts +59 -55
  78. package/types/api/ui/menu.d.ts +10 -6
  79. package/types/api/ui/navigation-bar.d.ts +67 -63
  80. package/types/api/ui/pull-down-refresh.d.ts +33 -29
  81. package/types/api/ui/scroll.d.ts +30 -26
  82. package/types/api/ui/sticky.d.ts +22 -19
  83. package/types/api/ui/tab-bar.d.ts +101 -97
  84. package/types/api/ui/window.d.ts +24 -18
  85. package/types/api/worker/index.d.ts +28 -24
  86. package/types/api/wxml/index.d.ts +42 -38
  87. package/types/global.d.ts +350 -0
  88. package/types/index.d.ts +12 -98
  89. package/types/taro.api.d.ts +94 -0
  90. package/types/taro.component.d.ts +10 -57
  91. package/types/taro.config.d.ts +24 -6
  92. package/types/taro.extend.d.ts +70 -67
  93. package/types/taro.hooks.d.ts +68 -67
  94. package/types/taro.lifecycle.d.ts +47 -28
  95. package/types/api/ad/index.ts +0 -6
  96. package/types/api/alipay/index.ts +0 -7
  97. package/types/api/index.d.ts +0 -352
@@ -1,59 +1,64 @@
1
- declare namespace Taro {
1
+ import Taro from '../../index'
2
+
3
+ declare module '../../index' {
2
4
  namespace getExtConfigSync {
3
5
  interface ExtInfo {
4
6
  /** 第三方平台自定义的数据 */
5
- extConfig: General.IAnyObject
7
+ extConfig: TaroGeneral.IAnyObject
6
8
  }
7
9
  }
8
10
 
9
- /** Taro.getExtConfig 的同步版本。
10
- *
11
- * **Tips**
12
- * 1. 本接口暂时无法通过 Taro.canIUse 判断是否兼容,开发者需要自行判断 Taro.getExtConfigSync 是否存在来兼容
13
- * @supported weapp
14
- * @example
15
- * ```tsx
16
- * let extConfig = Taro.getExtConfigSync? Taro.getExtConfigSync(): {}
17
- *
18
- * console.log(extConfig)
19
- * ```
20
- * @see https://developers.weixin.qq.com/miniprogram/dev/api/ext/wx.getExtConfigSync.html
21
- */
22
- function getExtConfigSync(): General.IAnyObject
23
-
24
11
  namespace getExtConfig {
25
12
  interface Option {
26
13
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
27
- complete?: (res: General.CallbackResult) => void
14
+ complete?: (res: TaroGeneral.CallbackResult) => void
28
15
  /** 接口调用失败的回调函数 */
29
- fail?: (res: General.CallbackResult) => void
16
+ fail?: (res: TaroGeneral.CallbackResult) => void
30
17
  /** 接口调用成功的回调函数 */
31
18
  success?: (result: SuccessCallbackResult) => void
32
19
  }
33
20
 
34
- interface SuccessCallbackResult extends General.CallbackResult {
21
+ interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
35
22
  /** 第三方平台自定义的数据 */
36
- extConfig: General.IAnyObject
23
+ extConfig: TaroGeneral.IAnyObject
37
24
  /** 调用结果 */
38
25
  errMsg: string
39
26
  }
40
27
  }
41
- /** 获取[第三方平台](https://developers.weixin.qq.com/miniprogram/dev/devtools/ext.html)自定义的数据字段。
42
- *
43
- * **Tips**
44
- * 1. 本接口暂时无法通过 Taro.canIUse 判断是否兼容,开发者需要自行判断 Taro.getExtConfig 是否存在来兼容
45
- * @supported weapp
46
- * @example
47
- * ```tsx
48
- * if(Taro.getExtConfig) {
49
- * Taro.getExtConfig({
50
- * success: function (res) {
51
- * console.log(res.extConfig)
52
- * }
53
- * })
54
- * }
55
- * ```
56
- * @see https://developers.weixin.qq.com/miniprogram/dev/api/ext/wx.getExtConfig.html
57
- */
58
- function getExtConfig(option?: getExtConfig.Option): Promise<getExtConfig.SuccessCallbackResult>
28
+
29
+ interface TaroStatic {
30
+ /** Taro.getExtConfig 的同步版本。
31
+ *
32
+ * **Tips**
33
+ * 1. 本接口暂时无法通过 Taro.canIUse 判断是否兼容,开发者需要自行判断 Taro.getExtConfigSync 是否存在来兼容
34
+ * @supported weapp
35
+ * @example
36
+ * ```tsx
37
+ * let extConfig = Taro.getExtConfigSync? Taro.getExtConfigSync(): {}
38
+ *
39
+ * console.log(extConfig)
40
+ * ```
41
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/ext/wx.getExtConfigSync.html
42
+ */
43
+ getExtConfigSync(): TaroGeneral.IAnyObject
44
+
45
+ /** 获取[第三方平台](https://developers.weixin.qq.com/miniprogram/dev/devtools/ext.html)自定义的数据字段。
46
+ *
47
+ * **Tips**
48
+ * 1. 本接口暂时无法通过 Taro.canIUse 判断是否兼容,开发者需要自行判断 Taro.getExtConfig 是否存在来兼容
49
+ * @supported weapp
50
+ * @example
51
+ * ```tsx
52
+ * if(Taro.getExtConfig) {
53
+ * Taro.getExtConfig({
54
+ * success: function (res) {
55
+ * console.log(res.extConfig)
56
+ * }
57
+ * })
58
+ * }
59
+ * ```
60
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/ext/wx.getExtConfig.html
61
+ */
62
+ getExtConfig(option?: getExtConfig.Option): Promise<getExtConfig.SuccessCallbackResult>
63
+ }
59
64
  }