@tarojs/taro 3.5.0-beta.0 → 3.5.0-beta.1

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 (55) hide show
  1. package/index.js +3 -4
  2. package/package.json +4 -4
  3. package/types/api/base/debug.d.ts +1 -1
  4. package/types/api/base/index.d.ts +3 -3
  5. package/types/api/base/performance.d.ts +5 -5
  6. package/types/api/base/system.d.ts +2 -2
  7. package/types/api/base/update.d.ts +6 -6
  8. package/types/api/base/weapp/app-event.d.ts +10 -10
  9. package/types/api/base/weapp/life-cycle.d.ts +1 -1
  10. package/types/api/data-analysis/index.d.ts +1 -1
  11. package/types/api/device/accelerometer.d.ts +3 -3
  12. package/types/api/device/calendar.d.ts +1 -1
  13. package/types/api/device/clipboard.d.ts +2 -2
  14. package/types/api/device/compass.d.ts +3 -3
  15. package/types/api/device/gyroscope.d.ts +4 -4
  16. package/types/api/device/keyboard.d.ts +1 -1
  17. package/types/api/device/memory.d.ts +1 -1
  18. package/types/api/device/network.d.ts +2 -2
  19. package/types/api/device/phone.d.ts +1 -1
  20. package/types/api/device/scan.d.ts +1 -1
  21. package/types/api/device/screen.d.ts +5 -5
  22. package/types/api/device/vibrate.d.ts +2 -2
  23. package/types/api/device/wifi.d.ts +3 -3
  24. package/types/api/ext/index.d.ts +2 -2
  25. package/types/api/files/index.d.ts +32 -32
  26. package/types/api/framework/index.d.ts +1 -1
  27. package/types/api/location/index.d.ts +9 -9
  28. package/types/api/media/audio.d.ts +1 -1
  29. package/types/api/media/background-audio.d.ts +1 -1
  30. package/types/api/media/camera.d.ts +8 -8
  31. package/types/api/media/image.d.ts +5 -5
  32. package/types/api/media/map.d.ts +15 -15
  33. package/types/api/media/recorder.d.ts +9 -9
  34. package/types/api/media/video.d.ts +2 -2
  35. package/types/api/navigate/index.d.ts +2 -2
  36. package/types/api/network/download.d.ts +5 -5
  37. package/types/api/network/request.d.ts +3 -3
  38. package/types/api/network/upload.d.ts +5 -5
  39. package/types/api/network/websocket.d.ts +6 -6
  40. package/types/api/open-api/address.d.ts +1 -1
  41. package/types/api/open-api/authorize.d.ts +1 -1
  42. package/types/api/open-api/settings.d.ts +2 -2
  43. package/types/api/open-api/subscribe-message.d.ts +2 -2
  44. package/types/api/open-api/user-info.d.ts +2 -2
  45. package/types/api/route/index.d.ts +5 -5
  46. package/types/api/share/index.d.ts +2 -2
  47. package/types/api/storage/index.d.ts +10 -10
  48. package/types/api/ui/animation.d.ts +32 -32
  49. package/types/api/ui/interaction.d.ts +6 -6
  50. package/types/api/ui/menu.d.ts +1 -1
  51. package/types/api/ui/navigation-bar.d.ts +5 -5
  52. package/types/api/ui/pull-down-refresh.d.ts +2 -2
  53. package/types/api/ui/scroll.d.ts +4 -2
  54. package/types/api/ui/tab-bar.d.ts +8 -8
  55. package/types/api/wxml/index.d.ts +16 -16
@@ -180,17 +180,17 @@ declare module '../../index' {
180
180
  }
181
181
 
182
182
  /** 文件管理器,可通过 [Taro.getFileSystemManager](./getFileSystemManager) 获取。
183
- * @supported weapp
183
+ * @supported weapp, tt
184
184
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.html
185
185
  */
186
186
  interface FileSystemManager {
187
187
  /** 判断文件/目录是否存在
188
- * @supported weapp
188
+ * @supported weapp, tt
189
189
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.access.html
190
190
  */
191
191
  access(option: FileSystemManager.AccessOption): void
192
192
  /** [FileSystemManager.access](#access) 的同步版本
193
- * @supported weapp
193
+ * @supported weapp, tt
194
194
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.accessSync.html
195
195
  */
196
196
  accessSync(
@@ -225,12 +225,12 @@ declare module '../../index' {
225
225
  */
226
226
  closeSync(option: FileSystemManager.CloseSyncOption): void
227
227
  /** 复制文件
228
- * @supported weapp
228
+ * @supported weapp, tt
229
229
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.copyFile.html
230
230
  */
231
231
  copyFile(option: FileSystemManager.CopyFileOption): void
232
232
  /** [FileSystemManager.copyFile](#copyfile) 的同步版本
233
- * @supported weapp
233
+ * @supported weapp, tt
234
234
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.copyFileSync.html
235
235
  */
236
236
  copyFileSync(
@@ -260,22 +260,22 @@ declare module '../../index' {
260
260
  */
261
261
  ftruncateSync(option: FileSystemManager.FtruncateSyncOption): void
262
262
  /** 获取该小程序下的 `本地临时文件` 或 `本地缓存文件` 信息
263
- * @supported weapp
263
+ * @supported weapp, tt
264
264
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.getFileInfo.html
265
265
  */
266
266
  getFileInfo(option: FileSystemManager.getFileInfoOption): void
267
267
  /** 获取该小程序下已保存的本地缓存文件列表
268
- * @supported weapp
268
+ * @supported weapp, tt
269
269
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.getSavedFileList.html
270
270
  */
271
271
  getSavedFileList(option?: FileSystemManager.getSavedFileListOption): void
272
272
  /** 创建目录
273
- * @supported weapp
273
+ * @supported weapp, tt
274
274
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.mkdir.html
275
275
  */
276
276
  mkdir(option: FileSystemManager.MkdirOption): void
277
277
  /** [FileSystemManager.mkdir](#mkdir) 的同步版本
278
- * @supported weapp
278
+ * @supported weapp, tt
279
279
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.mkdirSync.html
280
280
  */
281
281
  mkdirSync(
@@ -310,12 +310,12 @@ declare module '../../index' {
310
310
  */
311
311
  readCompressedFileSync(option: FileSystemManager.readCompressedFileSync.Option): ArrayBuffer /** 文件读取结果 */
312
312
  /** 读取目录内文件列表
313
- * @supported weapp
313
+ * @supported weapp, tt
314
314
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readdir.html
315
315
  */
316
316
  readdir(option: FileSystemManager.ReaddirOption): void
317
317
  /** [FileSystemManager.readdir](#readdir) 的同步版本
318
- * @supported weapp
318
+ * @supported weapp, tt
319
319
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readdirSync.html
320
320
  */
321
321
  readdirSync(
@@ -323,12 +323,12 @@ declare module '../../index' {
323
323
  dirPath: string,
324
324
  ): string[]
325
325
  /** 读取本地文件内容
326
- * @supported weapp
326
+ * @supported weapp, tt
327
327
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readFile.html
328
328
  */
329
329
  readFile(option: FileSystemManager.ReadFileOption): void
330
330
  /** [FileSystemManager.readFile](#readfile) 的同步版本
331
- * @supported weapp
331
+ * @supported weapp, tt
332
332
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.readFileSync.html
333
333
  */
334
334
  readFileSync(
@@ -364,12 +364,12 @@ declare module '../../index' {
364
364
  */
365
365
  removeSavedFile(option: FileSystemManager.RemoveSavedFileOption): void
366
366
  /** 重命名文件。可以把文件从 oldPath 移动到 newPath
367
- * @supported weapp
367
+ * @supported weapp, tt
368
368
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.rename.html
369
369
  */
370
370
  rename(option: FileSystemManager.RenameOption): void
371
371
  /** [FileSystemManager.rename](#rename) 的同步版本
372
- * @supported weapp
372
+ * @supported weapp, tt
373
373
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.renameSync.html
374
374
  */
375
375
  renameSync(
@@ -379,12 +379,12 @@ declare module '../../index' {
379
379
  newPath: string,
380
380
  ): void
381
381
  /** 删除目录
382
- * @supported weapp
382
+ * @supported weapp, tt
383
383
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.rmdir.html
384
384
  */
385
385
  rmdir(option: FileSystemManager.RmdirOption): void
386
386
  /** [FileSystemManager.rmdir](#rmdir) 的同步版本
387
- * @supported weapp
387
+ * @supported weapp, tt
388
388
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.rmdirSync.html
389
389
  */
390
390
  rmdirSync(
@@ -394,12 +394,12 @@ declare module '../../index' {
394
394
  recursive?: boolean,
395
395
  ): void
396
396
  /** 保存临时文件到本地。此接口会移动临时文件,因此调用成功后,tempFilePath 将不可用。
397
- * @supported weapp
397
+ * @supported weapp, tt
398
398
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.saveFile.html
399
399
  */
400
400
  saveFile(option: FileSystemManager.SaveFileOption): void
401
401
  /** [FileSystemManager.saveFile](#savefile) 的同步版本
402
- * @supported weapp
402
+ * @supported weapp, tt
403
403
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.saveFileSync.html
404
404
  */
405
405
  saveFileSync(
@@ -409,12 +409,12 @@ declare module '../../index' {
409
409
  filePath?: string,
410
410
  ): string
411
411
  /** 获取文件 Stats 对象
412
- * @supported weapp
412
+ * @supported weapp, tt
413
413
  * https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.stat.html
414
414
  */
415
415
  stat(option: FileSystemManager.StatOption): void
416
416
  /** [FileSystemManager.stat](#stat) 的同步版本
417
- * @supported weapp
417
+ * @supported weapp, tt
418
418
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.statSync.html
419
419
  */
420
420
  statSync(
@@ -434,12 +434,12 @@ declare module '../../index' {
434
434
  */
435
435
  truncateSync(option: FileSystemManager.TruncateSyncOption): void
436
436
  /** 删除文件
437
- * @supported weapp
437
+ * @supported weapp, tt
438
438
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.unlink.html
439
439
  */
440
440
  unlink(option: FileSystemManager.UnlinkOption): void
441
441
  /** [FileSystemManager.unlink](#unlink) 的同步版本
442
- * @supported weapp
442
+ * @supported weapp, tt
443
443
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.unlinkSync.html
444
444
  */
445
445
  unlinkSync(
@@ -447,7 +447,7 @@ declare module '../../index' {
447
447
  filePath: string,
448
448
  ): void
449
449
  /** 解压文件
450
- * @supported weapp
450
+ * @supported weapp, tt
451
451
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.unzip.html
452
452
  */
453
453
  unzip(option: FileSystemManager.UnzipOption): void
@@ -457,12 +457,12 @@ declare module '../../index' {
457
457
  */
458
458
  write(option: FileSystemManager.WriteOption): void
459
459
  /** 写文件
460
- * @supported weapp
460
+ * @supported weapp, tt
461
461
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.writeFile.html
462
462
  */
463
463
  writeFile(option: FileSystemManager.WriteFileOption): void
464
464
  /** [FileSystemManager.writeFile](#writefile) 的同步版本
465
- * @supported weapp
465
+ * @supported weapp, tt
466
466
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.writeFileSync.html
467
467
  */
468
468
  writeFileSync(
@@ -1326,7 +1326,7 @@ declare module '../../index' {
1326
1326
  saveFileToDisk(option: saveFileToDisk.Option): Promise<TaroGeneral.CallbackResult>
1327
1327
 
1328
1328
  /** 保存文件到本地。**注意:saveFile 会把临时文件移动,因此调用成功后传入的 tempFilePath 将不可用**
1329
- * @supported weapp, rn
1329
+ * @supported weapp, rn, tt
1330
1330
  * @example
1331
1331
  * ```tsx
1332
1332
  * Taro.chooseImage({
@@ -1346,7 +1346,7 @@ declare module '../../index' {
1346
1346
  saveFile(option: saveFile.Option): Promise<saveFile.SuccessCallbackResult | saveFile.FailCallbackResult>
1347
1347
 
1348
1348
  /** 删除该小程序下已保存的本地缓存文件
1349
- * @supported weapp, rn
1349
+ * @supported weapp, rn, tt
1350
1350
  * @example
1351
1351
  * ```tsx
1352
1352
  * Taro.getSavedFileList({
@@ -1367,7 +1367,7 @@ declare module '../../index' {
1367
1367
  removeSavedFile(option: removeSavedFile.Option): Promise<TaroGeneral.CallbackResult>
1368
1368
 
1369
1369
  /** 新开页面打开文档,支持格式
1370
- * @supported weapp
1370
+ * @supported weapp, tt
1371
1371
  * @example
1372
1372
  ```tsx
1373
1373
  * Taro.downloadFile({
@@ -1388,7 +1388,7 @@ declare module '../../index' {
1388
1388
  openDocument(option: openDocument.Option): Promise<TaroGeneral.CallbackResult>
1389
1389
 
1390
1390
  /** 获取本地已保存的文件列表
1391
- * @supported weapp, rn
1391
+ * @supported weapp, rn, tt
1392
1392
  * @example
1393
1393
  * ```tsx
1394
1394
  * Taro.getSavedFileList({
@@ -1419,7 +1419,7 @@ declare module '../../index' {
1419
1419
 
1420
1420
  /**
1421
1421
  * 获取该小程序下的 本地临时文件 或 本地缓存文件 信息
1422
- * @supported weapp, rn
1422
+ * @supported weapp, rn, tt
1423
1423
  * @example
1424
1424
  * ```tsx
1425
1425
  * Taro.getFileInfo({
@@ -1434,7 +1434,7 @@ declare module '../../index' {
1434
1434
  getFileInfo(option: getFileInfo.Option): Promise<getFileInfo.SuccessCallbackResult | getFileInfo.FailCallbackResult>
1435
1435
 
1436
1436
  /** 获取全局唯一的文件管理器
1437
- * @supported weapp
1437
+ * @supported weapp, tt
1438
1438
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.getFileSystemManager.html
1439
1439
  */
1440
1440
  getFileSystemManager(): FileSystemManager
@@ -32,7 +32,7 @@ declare module '../../index' {
32
32
  * __注意:__
33
33
  * - __不要尝试修改页面栈,会导致路由以及页面状态错误。__
34
34
  * - 不要在 `App.onLaunch` 的时候调用 `getCurrentPages()`,此时 `page` 还没有生成。
35
- * @supported weapp, h5
35
+ * @supported weapp, h5, rn, tt
36
36
  * @example
37
37
  * ```tsx
38
38
  * Taro.getCurrentPages().length
@@ -190,7 +190,7 @@ declare module '../../index' {
190
190
 
191
191
  interface TaroStatic {
192
192
  /** 关闭监听实时位置变化,前后台都停止消息接收
193
- * @supported weapp
193
+ * @supported weapp, rn, tt
194
194
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.stopLocationUpdate.html
195
195
  */
196
196
  stopLocationUpdate(option?: stopLocationUpdate.Option): void
@@ -212,13 +212,13 @@ declare module '../../index' {
212
212
  *
213
213
  * **注意**
214
214
  * - 获取位置信息需配置[地理位置用途说明](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#permission)。
215
- * @supported weapp
215
+ * @supported weapp, rn, tt
216
216
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.startLocationUpdate.html
217
217
  */
218
218
  startLocationUpdate(option?: startLocationUpdate.Option): void
219
219
 
220
220
  /** 使用微信内置地图查看位置
221
- * @supported weapp, h5
221
+ * @supported weapp, h5, tt
222
222
  * @example
223
223
  * ```tsx
224
224
  * Taro.getLocation({
@@ -239,7 +239,7 @@ declare module '../../index' {
239
239
  openLocation(option: openLocation.Option): Promise<TaroGeneral.CallbackResult>
240
240
 
241
241
  /** 监听持续定位接口返回失败时触发
242
- * @supported weapp
242
+ * @supported weapp, tt
243
243
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.onLocationChangeError.html
244
244
  */
245
245
  onLocationChangeError(
@@ -248,7 +248,7 @@ declare module '../../index' {
248
248
  ): void
249
249
 
250
250
  /** 监听实时地理位置变化事件,需结合 Taro.startLocationUpdateBackground、Taro.startLocationUpdate 使用。
251
- * @supported weapp
251
+ * @supported weapp, rn, tt
252
252
  * @example
253
253
  * ```tsx
254
254
  * const _locationChangeFn = function (res) {
@@ -265,7 +265,7 @@ declare module '../../index' {
265
265
  ): void
266
266
 
267
267
  /** 取消监听持续定位接口返回失败时触发
268
- * @supported weapp
268
+ * @supported weapp, tt
269
269
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.offLocationChangeError.html
270
270
  */
271
271
  offLocationChangeError(
@@ -274,7 +274,7 @@ declare module '../../index' {
274
274
  ): void
275
275
 
276
276
  /** 取消监听实时地理位置变化事件
277
- * @supported weapp
277
+ * @supported weapp, rn, tt
278
278
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.offLocationChange.html
279
279
  */
280
280
  offLocationChange(
@@ -287,7 +287,7 @@ declare module '../../index' {
287
287
  * **注意**
288
288
  * - 工具中定位模拟使用IP定位,可能会有一定误差。且工具目前仅支持 gcj02 坐标。
289
289
  * - 使用第三方服务进行逆地址解析时,请确认第三方服务默认的坐标系,正确进行坐标转换。
290
- * @supported weapp
290
+ * @supported weapp, rn, tt
291
291
  * @example
292
292
  * ```tsx
293
293
  * Taro.getLocation({
@@ -313,7 +313,7 @@ declare module '../../index' {
313
313
  /** 打开地图选择位置。
314
314
  *
315
315
  * `chooseLocation` api功能是依赖于腾讯位置服务,所以需要使用 api 密钥。如果您没有,可以前往腾讯位置服务[开发者控制台](https://lbs.qq.com/console/mykey.html?console=mykey)进行申请。
316
- * @supported weapp, h5
316
+ * @supported weapp, h5, tt
317
317
  * @example
318
318
  * ```tsx
319
319
  * // config/index.js
@@ -943,7 +943,7 @@ declare module '../../index' {
943
943
  createMediaAudioPlayer(): MediaAudioPlayer
944
944
 
945
945
  /** 创建内部 audio 上下文 InnerAudioContext 对象。
946
- * @supported weapp, h5, rn
946
+ * @supported weapp, h5, rn, tt
947
947
  * @example
948
948
  * ```tsx
949
949
  * const innerAudioContext = Taro.createInnerAudioContext()
@@ -274,7 +274,7 @@ declare module '../../index' {
274
274
  * 小程序切入后台,如果音频处于播放状态,可以继续播放。但是后台状态不能通过调用API操纵音频的播放状态。
275
275
  *
276
276
  * 从微信客户端6.7.2版本开始,若需要在小程序切后台后继续播放音频,需要在 [app.json](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html) 中配置 `requiredBackgroundModes` 属性。开发版和体验版上可以直接生效,正式版还需通过审核。
277
- * @supported weapp
277
+ * @supported weapp, tt
278
278
  * @example
279
279
  * ```tsx
280
280
  * const backgroundAudioManager = Taro.getBackgroundAudioManager()
@@ -10,7 +10,7 @@ declare module '../../index' {
10
10
  * ****
11
11
  *
12
12
  * 注: 使用该接口需同时在 [camera](/docs/components/media/camera) 组件属性中指定 frame-size。
13
- * @supported weapp
13
+ * @supported weapp, tt
14
14
  * @example
15
15
  * ```tsx
16
16
  * const context = wx.createCameraContext()
@@ -26,22 +26,22 @@ declare module '../../index' {
26
26
  callback: CameraContext.OnCameraFrameCallback,
27
27
  ): CameraFrameListener
28
28
  /** 设置缩放级别
29
- * @supported weapp
29
+ * @supported weapp, tt
30
30
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/CameraContext.setZoom.html
31
31
  */
32
32
  setZoom(option: CameraContext.SetZoomOption): void
33
33
  /** 开始录像
34
- * @supported weapp, rn
34
+ * @supported weapp, rn, tt
35
35
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/CameraContext.startRecord.html
36
36
  */
37
37
  startRecord(option: CameraContext.StartRecordOption): void
38
38
  /** 结束录像
39
- * @supported weapp, rn
39
+ * @supported weapp, rn, tt
40
40
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/CameraContext.stopRecord.html
41
41
  */
42
42
  stopRecord(option?: CameraContext.StopRecordOption): void
43
43
  /** 拍摄照片
44
- * @supported weapp, rn
44
+ * @supported weapp, rn, tt
45
45
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/CameraContext.takePhoto.html
46
46
  */
47
47
  takePhoto(option: CameraContext.TakePhotoOption): void
@@ -139,12 +139,12 @@ declare module '../../index' {
139
139
  */
140
140
  interface CameraFrameListener {
141
141
  /** 开始监听帧数据
142
- * @supported weapp
142
+ * @supported weapp, tt
143
143
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/CameraFrameListener.start.html
144
144
  */
145
145
  start(option?: CameraFrameListener.StartOption): void
146
146
  /** 停止监听帧数据
147
- * @supported weapp
147
+ * @supported weapp, tt
148
148
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/camera/CameraFrameListener.stop.html
149
149
  */
150
150
  stop(option?: CameraFrameListener.StopOption): void
@@ -171,7 +171,7 @@ declare module '../../index' {
171
171
 
172
172
  interface TaroStatic {
173
173
  /** 创建 camera 上下文 CameraContext 对象。
174
- * @supported weapp, rn
174
+ * @supported weapp, rn, tt
175
175
  * @example
176
176
  * ```tsx
177
177
  * const cameraContext = Taro.createCameraContext()
@@ -262,7 +262,7 @@ declare module '../../index' {
262
262
 
263
263
  interface TaroStatic {
264
264
  /** 保存图片到系统相册。需要[用户授权](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html) scope.writePhotosAlbum
265
- * @supported weapp, rn, alipay, swan
265
+ * @supported weapp, rn, alipay, swan, tt
266
266
  * @example
267
267
  * ```tsx
268
268
  * Taro.saveImageToPhotosAlbum({
@@ -286,7 +286,7 @@ declare module '../../index' {
286
286
  previewMedia(option: previewMedia.Option): Promise<TaroGeneral.CallbackResult>
287
287
 
288
288
  /** 在新页面中全屏预览图片。预览的过程中用户可以进行保存图片、发送给朋友等操作。
289
- * @supported weapp, h5, rn, alipay, swan
289
+ * @supported weapp, h5, rn, alipay, swan, tt
290
290
  * @example
291
291
  * ```tsx
292
292
  * Taro.previewImage({
@@ -299,7 +299,7 @@ declare module '../../index' {
299
299
  previewImage(option: previewImage.Option): Promise<TaroGeneral.CallbackResult>
300
300
 
301
301
  /** 获取图片信息。网络图片需先配置download域名才能生效。
302
- * @supported weapp, h5, rn, alipay, swan
302
+ * @supported weapp, h5, rn, alipay, swan, tt
303
303
  * @example
304
304
  * ```tsx
305
305
  * Taro.getImageInfo({
@@ -338,7 +338,7 @@ declare module '../../index' {
338
338
  editImage(option: editImage.Option): Promise<editImage.SuccessCallbackResult>
339
339
 
340
340
  /** 压缩图片接口,可选压缩质量
341
- * @supported weapp, rn
341
+ * @supported weapp, rn, tt
342
342
  * @example
343
343
  * ```tsx
344
344
  * Taro.compressImage({
@@ -369,7 +369,7 @@ declare module '../../index' {
369
369
 
370
370
  /**
371
371
  * 从本地相册选择图片或使用相机拍照。
372
- * @supported weapp, h5, rn, alipay, swan
372
+ * @supported weapp, h5, rn, alipay, swan, tt
373
373
  * @example
374
374
  * ```tsx
375
375
  * Taro.chooseImage({
@@ -4,30 +4,30 @@ import Taro from '../../index'
4
4
  declare module '../../index' {
5
5
  /** `MapContext` 实例,可通过 [Taro.createMapContext](./createMapContext) 获取。
6
6
  * `MapContext` 通过 id 跟一个 map 组件绑定,操作对应的 map 组件。
7
- * @supported weapp
7
+ * @supported weapp, tt
8
8
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.html
9
9
  */
10
10
  interface MapContext {
11
11
  /** 获取当前地图中心的经纬度。返回的是 gcj02 坐标系,可以用于 [Taro.openLocation()](/docs/apis/location/openLocation)
12
- * @supported weapp
12
+ * @supported weapp, tt
13
13
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getCenterLocation.html
14
14
  */
15
15
  getCenterLocation(option?: MapContext.GetCenterLocationOption): Promise<MapContext.GetCenterLocationSuccessCallbackResult>
16
16
 
17
17
  /** 设置定位点图标,支持网络路径、本地路径、代码包路径
18
- * @supported weapp
18
+ * @supported weapp, tt
19
19
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.setLocMarkerIcon.html
20
20
  */
21
21
  setLocMarkerIcon(option?: MapContext.SetLocMarkerIconOption): Promise<TaroGeneral.CallbackResult>
22
22
 
23
23
  /** 将地图中心移置当前定位点,此时需设置地图组件 show-location 为true。
24
- * @supported weapp
24
+ * @supported weapp, tt
25
25
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.moveToLocation.html
26
26
  */
27
27
  moveToLocation(option: MapContext.MoveToLocationOption): Promise<TaroGeneral.CallbackResult>
28
28
 
29
29
  /** 平移marker,带动画
30
- * @supported weapp
30
+ * @supported weapp, tt
31
31
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.translateMarker.html
32
32
  */
33
33
  translateMarker(option: MapContext.TranslateMarkerOption): Promise<TaroGeneral.CallbackResult>
@@ -36,37 +36,37 @@ declare module '../../index' {
36
36
  moveAlong(object)
37
37
 
38
38
  /** 缩放视野展示所有经纬度
39
- * @supported weapp
39
+ * @supported weapp, tt
40
40
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.includePoints.html
41
41
  */
42
42
  includePoints(option: MapContext.IncludePointsOption): Promise<TaroGeneral.CallbackResult>
43
43
 
44
44
  /** 获取当前地图的视野范围
45
- * @supported weapp
45
+ * @supported weapp, tt
46
46
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getRegion.html
47
47
  */
48
48
  getRegion(option?: MapContext.GetRegionOption): Promise<MapContext.GetRegionSuccessCallbackResult>
49
49
 
50
50
  /** 获取当前地图的旋转角
51
- * @supported weapp
51
+ * @supported weapp, tt
52
52
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getRotate.html
53
53
  */
54
54
  getRotate(option?: MapContext.GetRotateOption): Promise<MapContext.GetRotateSuccessCallbackResult>
55
55
 
56
56
  /** 获取当前地图的倾斜角
57
- * @supported weapp
57
+ * @supported weapp, tt
58
58
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getSkew.html
59
59
  */
60
60
  getSkew(option?: MapContext.GetSkewOption): Promise<MapContext.GetSkewSuccessCallbackResult>
61
61
 
62
62
  /** 获取当前地图的缩放级别
63
- * @supported weapp
63
+ * @supported weapp, tt
64
64
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getScale.html
65
65
  */
66
66
  getScale(option?: MapContext.GetScaleOption): Promise<MapContext.GetScaleSuccessCallbackResult>
67
67
 
68
68
  /** 设置地图中心点偏移,向后向下为增长,屏幕比例范围(0.25~0.75),默认偏移为[0.5, 0.5]
69
- * @supported weapp
69
+ * @supported weapp, tt
70
70
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.setCenterOffset.html
71
71
  */
72
72
  setCenterOffset(option: MapContext.SetCenterOffsetOption): Promise<TaroGeneral.CallbackResult>
@@ -84,7 +84,7 @@ declare module '../../index' {
84
84
  addCustomLayer(option: MapContext.AddCustomLayerOption): Promise<TaroGeneral.CallbackResult>
85
85
 
86
86
  /** 创建自定义图片图层,图片会随着地图缩放而缩放。
87
- * @supported weapp
87
+ * @supported weapp, tt
88
88
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.addGroundOverlay.html
89
89
  */
90
90
  addGroundOverlay(option: MapContext.AddGroundLayerOption): Promise<TaroGeneral.CallbackResult>
@@ -120,13 +120,13 @@ declare module '../../index' {
120
120
  setBoundary(option: MapContext.SetBoundaryOption): Promise<TaroGeneral.CallbackResult>
121
121
 
122
122
  /** 更新自定义图片图层。
123
- * @supported weapp
123
+ * @supported weapp, tt
124
124
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.updateGroundOverlay.html
125
125
  */
126
126
  updateGroundOverlay(option: MapContext.UpdateGroundOverlayOption): Promise<TaroGeneral.CallbackResult>
127
127
 
128
128
  /** 移除自定义图片图层。
129
- * @supported weapp
129
+ * @supported weapp, tt
130
130
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.removeGroundOverlay.html
131
131
  */
132
132
  removeGroundOverlay(option: MapContext.RemoveGroundOverlayOption): Promise<TaroGeneral.CallbackResult>
@@ -621,7 +621,7 @@ declare module '../../index' {
621
621
 
622
622
  interface TaroStatic {
623
623
  /** 创建 [map](/docs/components/maps/map) 上下文 [MapContext](/docs/apis/media/map/MapContext) 对象。
624
- * @supported weapp
624
+ * @supported weapp, tt
625
625
  * @example
626
626
  * ```tsx
627
627
  * const mapCtx = Taro.createMapContext('myMap')
@@ -155,7 +155,7 @@ declare module '../../index' {
155
155
  */
156
156
  interface RecorderManager {
157
157
  /** 监听录音错误事件
158
- * @supported weapp, rn
158
+ * @supported weapp, rn, tt
159
159
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.onError.html
160
160
  */
161
161
  onError(
@@ -163,7 +163,7 @@ declare module '../../index' {
163
163
  callback: RecorderManager.OnErrorCallback,
164
164
  ): void
165
165
  /** 监听已录制完指定帧大小的文件事件。如果设置了 frameSize,则会回调此事件。
166
- * @supported weapp
166
+ * @supported weapp, tt
167
167
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.onFrameRecorded.html
168
168
  */
169
169
  onFrameRecorded(
@@ -187,7 +187,7 @@ declare module '../../index' {
187
187
  callback: (res: TaroGeneral.CallbackResult) => void,
188
188
  ): void
189
189
  /** 监听录音暂停事件
190
- * @supported weapp, rn
190
+ * @supported weapp, rn, tt
191
191
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.onPause.html
192
192
  */
193
193
  onPause(
@@ -195,7 +195,7 @@ declare module '../../index' {
195
195
  callback: (res: TaroGeneral.CallbackResult) => void,
196
196
  ): void
197
197
  /** 监听录音继续事件
198
- * @supported weapp, rn
198
+ * @supported weapp, rn, tt
199
199
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.onResume.html
200
200
  */
201
201
  onResume(
@@ -203,7 +203,7 @@ declare module '../../index' {
203
203
  callback: (res: TaroGeneral.CallbackResult) => void,
204
204
  ): void
205
205
  /** 监听录音开始事件
206
- * @supported weapp, rn
206
+ * @supported weapp, rn, tt
207
207
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.onStart.html
208
208
  */
209
209
  onStart(
@@ -211,7 +211,7 @@ declare module '../../index' {
211
211
  callback: (res: TaroGeneral.CallbackResult) => void,
212
212
  ): void
213
213
  /** 监听录音结束事件
214
- * @supported weapp, rn
214
+ * @supported weapp, rn, tt
215
215
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.onStop.html
216
216
  */
217
217
  onStop(
@@ -224,17 +224,17 @@ declare module '../../index' {
224
224
  */
225
225
  pause(): void
226
226
  /** 继续录音
227
- * @supported weapp, rn
227
+ * @supported weapp, rn, tt
228
228
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.resume.html
229
229
  */
230
230
  resume(): void
231
231
  /** 开始录音
232
- * @supported weapp, rn
232
+ * @supported weapp, rn, tt
233
233
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.start.html
234
234
  */
235
235
  start(option: RecorderManager.StartOption): void
236
236
  /** 停止录音
237
- * @supported weapp, rn
237
+ * @supported weapp, rn, tt
238
238
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/recorder/RecorderManager.stop.html
239
239
  */
240
240
  stop(): void
@@ -348,7 +348,7 @@ declare module '../../index' {
348
348
  * @example
349
349
  ```tsx
350
350
  * Taro.saveVideoToPhotosAlbum({
351
- * filePath: 'wxfile://xxx'
351
+ * filePath: 'wxfile://xxx',
352
352
  * success: function (res) {
353
353
  * console.log(res.errMsg)
354
354
  * }
@@ -462,7 +462,7 @@ declare module '../../index' {
462
462
  chooseVideo(option: chooseVideo.Option): Promise<chooseVideo.SuccessCallbackResult>
463
463
 
464
464
  /** 拍摄或从手机相册中选择图片或视频。
465
- * @supported weapp, rn
465
+ * @supported weapp
466
466
  * @example
467
467
  * ```tsx
468
468
  * Taro.chooseMedia({