@tarojs/taro 3.3.12 → 3.3.16
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/ad/index.d.ts +34 -28
- package/types/api/alipay/index.d.ts +11 -7
- package/types/api/base/debug.d.ts +60 -54
- package/types/api/base/env.d.ts +12 -8
- package/types/api/base/index.d.ts +87 -83
- package/types/api/base/system.d.ts +59 -54
- package/types/api/base/update.d.ts +37 -33
- package/types/api/base/weapp/app-event.d.ts +147 -131
- package/types/api/base/weapp/life-cycle.d.ts +14 -10
- package/types/api/canvas/index.d.ts +115 -110
- package/types/api/cloud/index.d.ts +99 -94
- package/types/api/data-analysis/index.d.ts +68 -64
- package/types/api/device/accelerometer.d.ts +57 -50
- package/types/api/device/battery.d.ts +19 -15
- package/types/api/device/ble.d.ts +241 -228
- package/types/api/device/bluetooth.d.ts +207 -194
- package/types/api/device/clipboard.d.ts +48 -43
- package/types/api/device/compass.d.ts +55 -48
- package/types/api/device/contact.d.ts +13 -9
- package/types/api/device/gyroscope.d.ts +41 -35
- package/types/api/device/iBeacon.d.ts +79 -73
- package/types/api/device/motion.d.ts +42 -37
- package/types/api/device/network.d.ts +80 -42
- package/types/api/device/nfc.d.ts +105 -96
- package/types/api/device/performance.d.ts +32 -18
- package/types/api/device/phone.d.ts +20 -15
- package/types/api/device/scan.d.ts +31 -26
- package/types/api/device/screen.d.ts +74 -67
- package/types/api/device/vibrate.d.ts +31 -25
- package/types/api/device/wifi.d.ts +151 -140
- package/types/api/ext/index.d.ts +44 -39
- package/types/api/files/index.d.ts +219 -209
- package/types/api/framework/index.d.ts +25 -20
- package/types/api/location/index.d.ts +140 -136
- package/types/api/media/audio.d.ts +135 -127
- package/types/api/media/background-audio.d.ts +135 -126
- package/types/api/media/camera.d.ts +30 -26
- package/types/api/media/editor.d.ts +35 -33
- package/types/api/media/image.d.ts +161 -150
- package/types/api/media/live.d.ts +88 -82
- package/types/api/media/map.d.ts +47 -43
- package/types/api/media/recorder.d.ts +90 -84
- package/types/api/media/video-processing.d.ts +10 -6
- package/types/api/media/video.d.ts +63 -58
- package/types/api/network/download.d.ts +34 -30
- package/types/api/network/mdns.d.ts +104 -91
- package/types/api/network/request.d.ts +83 -79
- package/types/api/network/udp.d.ts +20 -16
- package/types/api/network/upload.d.ts +60 -56
- package/types/api/network/websocket.d.ts +201 -194
- package/types/api/open-api/account.d.ts +18 -14
- package/types/api/open-api/address.d.ts +27 -23
- package/types/api/open-api/authorize.d.ts +30 -26
- package/types/api/open-api/card.d.ts +55 -51
- package/types/api/open-api/customer-service.d.ts +21 -17
- package/types/api/open-api/facial.d.ts +28 -24
- package/types/api/open-api/invoice.d.ts +38 -34
- package/types/api/open-api/login.d.ts +56 -52
- package/types/api/open-api/navigate.d.ts +79 -75
- package/types/api/open-api/payment.d.ts +34 -30
- package/types/api/open-api/settings.d.ts +49 -45
- package/types/api/open-api/soter.d.ts +92 -86
- package/types/api/open-api/subscribe-message.d.ts +24 -20
- package/types/api/open-api/user-info.d.ts +60 -57
- package/types/api/open-api/werun.d.ts +50 -46
- package/types/api/route/index.d.ts +122 -118
- package/types/api/share/index.d.ts +68 -64
- package/types/api/storage/background-fetch.d.ts +40 -35
- package/types/api/storage/index.d.ts +267 -262
- package/types/api/swan/index.d.ts +47 -42
- package/types/api/ui/animation.d.ts +21 -17
- package/types/api/ui/background.d.ts +38 -34
- package/types/api/ui/custom-component.d.ts +22 -18
- package/types/api/ui/fonts.d.ts +26 -21
- package/types/api/ui/interaction.d.ts +171 -122
- package/types/api/ui/keyboard.d.ts +59 -55
- package/types/api/ui/menu.d.ts +10 -6
- package/types/api/ui/navigation-bar.d.ts +67 -63
- package/types/api/ui/pull-down-refresh.d.ts +33 -29
- package/types/api/ui/scroll.d.ts +30 -26
- package/types/api/ui/sticky.d.ts +22 -19
- package/types/api/ui/tab-bar.d.ts +101 -97
- package/types/api/ui/window.d.ts +24 -18
- package/types/api/worker/index.d.ts +28 -24
- package/types/api/wxml/index.d.ts +42 -38
- package/types/compile.d.ts +1 -5
- package/types/global.d.ts +392 -0
- package/types/index.d.ts +12 -98
- package/types/taro.api.d.ts +94 -0
- package/types/taro.component.d.ts +10 -57
- package/types/taro.config.d.ts +24 -6
- package/types/taro.extend.d.ts +46 -75
- package/types/taro.hooks.d.ts +68 -67
- package/types/taro.lifecycle.d.ts +47 -28
- package/types/api/ad/index.ts +0 -6
- package/types/api/alipay/index.ts +0 -7
- package/types/api/index.d.ts +0 -352
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
/** 创建 camera 上下文 CameraContext 对象。
|
|
3
|
-
* @supported weapp
|
|
4
|
-
* @example
|
|
5
|
-
* ```tsx
|
|
6
|
-
* const cameraContext = Taro.createCameraContext()
|
|
7
|
-
* ```
|
|
8
|
-
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/wx.createCameraContext.html
|
|
9
|
-
*/
|
|
10
|
-
function createCameraContext(): CameraContext
|
|
1
|
+
import Taro from '../../index'
|
|
11
2
|
|
|
12
|
-
|
|
3
|
+
declare module '../../index' {
|
|
4
|
+
/**
|
|
13
5
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/CameraContext.html
|
|
14
6
|
*/
|
|
15
7
|
interface CameraContext {
|
|
@@ -53,11 +45,11 @@ declare namespace Taro {
|
|
|
53
45
|
namespace CameraContext {
|
|
54
46
|
interface StartRecordOption {
|
|
55
47
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
56
|
-
complete?: (res:
|
|
48
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
57
49
|
/** 接口调用失败的回调函数 */
|
|
58
|
-
fail?: (res:
|
|
50
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
59
51
|
/** 接口调用成功的回调函数 */
|
|
60
|
-
success?: (res:
|
|
52
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
61
53
|
/** 超过30s或页面 `onHide` 时会结束录像 */
|
|
62
54
|
timeoutCallback?: StartRecordTimeoutCallback
|
|
63
55
|
}
|
|
@@ -73,13 +65,13 @@ declare namespace Taro {
|
|
|
73
65
|
}
|
|
74
66
|
interface StopRecordOption {
|
|
75
67
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
76
|
-
complete?: (res:
|
|
68
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
77
69
|
/** 接口调用失败的回调函数 */
|
|
78
|
-
fail?: (res:
|
|
70
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
79
71
|
/** 接口调用成功的回调函数 */
|
|
80
72
|
success?: (result: StopRecordSuccessCallbackResult) => void
|
|
81
73
|
}
|
|
82
|
-
interface StopRecordSuccessCallbackResult extends
|
|
74
|
+
interface StopRecordSuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
83
75
|
/** 封面图片文件的临时路径 */
|
|
84
76
|
tempThumbPath: string
|
|
85
77
|
/** 视频的文件的临时路径 */
|
|
@@ -89,15 +81,15 @@ declare namespace Taro {
|
|
|
89
81
|
}
|
|
90
82
|
interface TakePhotoOption {
|
|
91
83
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
92
|
-
complete?: (res:
|
|
84
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
93
85
|
/** 接口调用失败的回调函数 */
|
|
94
|
-
fail?: (res:
|
|
86
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
95
87
|
/** 成像质量 */
|
|
96
88
|
quality?: keyof quality
|
|
97
89
|
/** 接口调用成功的回调函数 */
|
|
98
90
|
success?: (result: TakePhotoSuccessCallbackResult) => void
|
|
99
91
|
}
|
|
100
|
-
interface TakePhotoSuccessCallbackResult extends
|
|
92
|
+
interface TakePhotoSuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
101
93
|
/** 照片文件的临时路径,安卓是jpg图片格式,ios是png */
|
|
102
94
|
tempImagePath: string
|
|
103
95
|
/** 调用结果 */
|
|
@@ -142,19 +134,31 @@ declare namespace Taro {
|
|
|
142
134
|
namespace CameraFrameListener {
|
|
143
135
|
interface StartOption {
|
|
144
136
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
145
|
-
complete?: (res:
|
|
137
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
146
138
|
/** 接口调用失败的回调函数 */
|
|
147
|
-
fail?: (res:
|
|
139
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
148
140
|
/** 接口调用成功的回调函数 */
|
|
149
|
-
success?: (res:
|
|
141
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
150
142
|
}
|
|
151
143
|
interface StopOption {
|
|
152
144
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
153
|
-
complete?: (res:
|
|
145
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
154
146
|
/** 接口调用失败的回调函数 */
|
|
155
|
-
fail?: (res:
|
|
147
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
156
148
|
/** 接口调用成功的回调函数 */
|
|
157
|
-
success?: (res:
|
|
149
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
158
150
|
}
|
|
159
151
|
}
|
|
152
|
+
|
|
153
|
+
interface TaroStatic {
|
|
154
|
+
/** 创建 camera 上下文 CameraContext 对象。
|
|
155
|
+
* @supported weapp
|
|
156
|
+
* @example
|
|
157
|
+
* ```tsx
|
|
158
|
+
* const cameraContext = Taro.createCameraContext()
|
|
159
|
+
* ```
|
|
160
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/wx.createCameraContext.html
|
|
161
|
+
*/
|
|
162
|
+
createCameraContext(): CameraContext
|
|
163
|
+
}
|
|
160
164
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import Taro from '../../index'
|
|
2
|
+
|
|
3
|
+
declare module '../../index' {
|
|
2
4
|
/** `EditorContext` 实例,可通过 `Taro.createSelectorQuery` 获取。
|
|
3
5
|
* `EditorContext` 通过 `id` 跟一个 `editor` 组件绑定,操作对应的 `editor` 组件。
|
|
4
6
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/editor/EditorContext.html
|
|
@@ -115,35 +117,35 @@ declare namespace Taro {
|
|
|
115
117
|
namespace EditorContext {
|
|
116
118
|
interface BlurOption {
|
|
117
119
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
118
|
-
complete?: (res:
|
|
120
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
119
121
|
/** 接口调用失败的回调函数 */
|
|
120
|
-
fail?: (res:
|
|
122
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
121
123
|
/** 接口调用成功的回调函数 */
|
|
122
|
-
success?: (res:
|
|
124
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
123
125
|
}
|
|
124
126
|
interface ClearOption {
|
|
125
127
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
126
|
-
complete?: (res:
|
|
128
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
127
129
|
/** 接口调用失败的回调函数 */
|
|
128
|
-
fail?: (res:
|
|
130
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
129
131
|
/** 接口调用成功的回调函数 */
|
|
130
|
-
success?: (res:
|
|
132
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
131
133
|
}
|
|
132
134
|
interface GetContentsOption {
|
|
133
135
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
134
|
-
complete?: (res:
|
|
136
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
135
137
|
/** 接口调用失败的回调函数 */
|
|
136
|
-
fail?: (res:
|
|
138
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
137
139
|
/** 接口调用成功的回调函数 */
|
|
138
|
-
success?: (res:
|
|
140
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
139
141
|
}
|
|
140
142
|
interface InsertDividerOption {
|
|
141
143
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
142
|
-
complete?: (res:
|
|
144
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
143
145
|
/** 接口调用失败的回调函数 */
|
|
144
|
-
fail?: (res:
|
|
146
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
145
147
|
/** 接口调用成功的回调函数 */
|
|
146
|
-
success?: (res:
|
|
148
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
147
149
|
}
|
|
148
150
|
interface InsertImageOption {
|
|
149
151
|
/** 图片地址,仅支持 http(s)、base64、云图片(2.8.0)、临时文件(2.8.3)。 */
|
|
@@ -151,65 +153,65 @@ declare namespace Taro {
|
|
|
151
153
|
/** 图像无法显示时的替代文本 */
|
|
152
154
|
alt?: string
|
|
153
155
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
154
|
-
complete?: (res:
|
|
156
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
155
157
|
/** data 被序列化为 name=value;name1=value2 的格式挂在属性 data-custom 上 */
|
|
156
|
-
data?:
|
|
158
|
+
data?: TaroGeneral.IAnyObject
|
|
157
159
|
/** 添加到图片 img 标签上的类名 */
|
|
158
160
|
extClass?: string
|
|
159
161
|
/** 接口调用失败的回调函数 */
|
|
160
|
-
fail?: (res:
|
|
162
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
161
163
|
/** 图片高度 (pixels/百分比) */
|
|
162
164
|
height?: string
|
|
163
165
|
/** 接口调用成功的回调函数 */
|
|
164
|
-
success?: (res:
|
|
166
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
165
167
|
/** 图片宽度(pixels/百分比) */
|
|
166
168
|
width?: string
|
|
167
169
|
}
|
|
168
170
|
interface InsertTextOption {
|
|
169
171
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
170
|
-
complete?: (res:
|
|
172
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
171
173
|
/** 接口调用失败的回调函数 */
|
|
172
|
-
fail?: (res:
|
|
174
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
173
175
|
/** 接口调用成功的回调函数 */
|
|
174
|
-
success?: (res:
|
|
176
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
175
177
|
/** 文本内容 */
|
|
176
178
|
text?: string
|
|
177
179
|
}
|
|
178
180
|
interface RedoOption {
|
|
179
181
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
180
|
-
complete?: (res:
|
|
182
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
181
183
|
/** 接口调用失败的回调函数 */
|
|
182
|
-
fail?: (res:
|
|
184
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
183
185
|
/** 接口调用成功的回调函数 */
|
|
184
|
-
success?: (res:
|
|
186
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
185
187
|
}
|
|
186
188
|
interface RemoveFormatOption {
|
|
187
189
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
188
|
-
complete?: (res:
|
|
190
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
189
191
|
/** 接口调用失败的回调函数 */
|
|
190
|
-
fail?: (res:
|
|
192
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
191
193
|
/** 接口调用成功的回调函数 */
|
|
192
|
-
success?: (res:
|
|
194
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
193
195
|
}
|
|
194
196
|
interface SetContentsOption {
|
|
195
197
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
196
|
-
complete?: (res:
|
|
198
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
197
199
|
/** 表示内容的delta对象 */
|
|
198
|
-
delta?:
|
|
200
|
+
delta?: TaroGeneral.IAnyObject
|
|
199
201
|
/** 接口调用失败的回调函数 */
|
|
200
|
-
fail?: (res:
|
|
202
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
201
203
|
/** 带标签的HTML内容 */
|
|
202
204
|
html?: string
|
|
203
205
|
/** 接口调用成功的回调函数 */
|
|
204
|
-
success?: (res:
|
|
206
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
205
207
|
}
|
|
206
208
|
interface UndoOption {
|
|
207
209
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
208
|
-
complete?: (res:
|
|
210
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
209
211
|
/** 接口调用失败的回调函数 */
|
|
210
|
-
fail?: (res:
|
|
212
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
211
213
|
/** 接口调用成功的回调函数 */
|
|
212
|
-
success?: (res:
|
|
214
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
217
|
}
|