Skip to content

Commit d409288

Browse files
committed
chore(types): 更新 api 支持端类型
1 parent 786c0bb commit d409288

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

packages/taro/types/api/canvas/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,7 @@ declare module '../../index' {
20482048
/** 创建 canvas 的绘图上下文 [CanvasContext](/docs/apis/canvas/CanvasContext) 对象
20492049
*
20502050
* **Tip**: 需要指定 canvasId,该绘图上下文只作用于对应的 `<canvas/>`;另外,Web 端需要在 `useReady` 回调中执行它,否则会因为底层 canvas 渲染出来之前而去获取 CanvasContext,导致其底层的 context 为 `undefined`,从而不能正常绘图。
2051-
* @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
2051+
* @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid, harmony
20522052
* @example
20532053
* ```tsx
20542054
* import { useReady } from '@tarojs/taro'

packages/taro/types/api/device/keyboard.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ declare module '../../index' {
4343

4444
interface TaroStatic {
4545
/** 在input、textarea等focus拉起键盘之后,手动调用此接口收起键盘
46-
* @supported weapp, alipay, swan, jd, tt, rn, harmony_hybrid
46+
* @supported weapp, alipay, swan, jd, tt, rn, harmony_hybrid, harmony
4747
* @example
4848
* ```tsx
4949
* Taro.hideKeyboard({

packages/taro/types/api/device/memory.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ declare module '../../index' {
2626
/** 监听内存不足告警事件。
2727
*
2828
* 当 iOS/Android 向小程序进程发出内存警告时,触发该事件。触发该事件不意味小程序被杀,大部分情况下仅仅是告警,开发者可在收到通知后回收一些不必要资源避免进一步加剧内存紧张。
29-
* @supported weapp, alipay, swan, jd, tt
29+
* @supported weapp, alipay, swan, jd, tt, harmony
3030
* @example
3131
* ```tsx
3232
* Taro.onMemoryWarning(function () {
@@ -41,7 +41,7 @@ declare module '../../index' {
4141
): void
4242

4343
/** 取消监听内存不足告警事件。
44-
* @supported weapp, alipay, swan
44+
* @supported weapp, alipay, swan, harmony
4545
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/memory/wx.offMemoryWarning.html
4646
*/
4747
offMemoryWarning(

packages/taro/types/api/files/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ declare module '../../index' {
14641464
getFileInfo(option: getFileInfo.Option): Promise<getFileInfo.SuccessCallbackResult | getFileInfo.FailCallbackResult>
14651465

14661466
/** 获取全局唯一的文件管理器
1467-
* @supported weapp, alipay, swan, jd, qq, tt, harmony_hybrid
1467+
* @supported weapp, alipay, swan, jd, qq, tt, harmony_hybrid, harmony
14681468
* @see https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.getFileSystemManager.html
14691469
*/
14701470
getFileSystemManager(): FileSystemManager

packages/taro/types/api/location/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ declare module '../../index' {
455455
* **注意**
456456
* - 工具中定位模拟使用IP定位,可能会有一定误差。且工具目前仅支持 gcj02 坐标。
457457
* - 使用第三方服务进行逆地址解析时,请确认第三方服务默认的坐标系,正确进行坐标转换。
458-
* @supported weapp, swan, jd, qq, tt, rn, harmony_hybrid
458+
* @supported weapp, swan, jd, qq, tt, rn, harmony_hybrid, harmony
459459
* @example
460460
* ```tsx
461461
* Taro.getLocation({

packages/taro/types/api/media/video.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ declare module '../../index' {
442442
getVideoInfo(option: getVideoInfo.Option): Promise<getVideoInfo.SuccessCallbackResult>
443443

444444
/** 创建 video 上下文 VideoContext 对象。
445-
* @supported weapp, h5, rn, harmony_hybrid
445+
* @supported weapp, h5, rn, harmony_hybrid, harmony
446446
* @example
447447
* ```tsx
448448
* videoContext = Taro.createVideoContext('myVideo')
@@ -505,7 +505,7 @@ declare module '../../index' {
505505
chooseVideo(option: chooseVideo.Option): Promise<chooseVideo.SuccessCallbackResult>
506506

507507
/** 拍摄或从手机相册中选择图片或视频。
508-
* @supported weapp, h5, harmony_hybrid
508+
* @supported weapp, h5, harmony_hybrid, harmony
509509
* @example
510510
* ```tsx
511511
* Taro.chooseMedia({

packages/taro/types/api/network/download.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ declare module '../../index' {
151151
/** 下载文件资源到本地。客户端直接发起一个 HTTPS GET 请求,返回文件的本地临时路径,单次下载允许的最大文件为 50MB。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)。
152152
*
153153
* 注意:请在服务端响应的 header 中指定合理的 `Content-Type` 字段,以保证客户端正确处理文件类型。
154-
* @supported weapp, h5, alipay, swan, rn, tt, harmony_hybrid
154+
* @supported weapp, h5, alipay, swan, rn, tt, harmony_hybrid, harmony
155155
* @example
156156
* ```tsx
157157
* Taro.downloadFile({

packages/taro/types/api/network/upload.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ declare module '../../index' {
152152

153153
interface TaroStatic {
154154
/** 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 `content-type` 为 `multipart/form-data`。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)。
155-
* @supported weapp, swan, alipay, h5, rn, tt, harmony_hybrid
155+
* @supported weapp, swan, alipay, h5, rn, tt, harmony_hybrid, harmony
156156
* @example
157157
* ```tsx
158158
* Taro.chooseImage({

packages/taro/types/api/route/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ declare module '../../index' {
220220

221221
interface TaroStatic {
222222
/** 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
223-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
223+
* @supported weapp, h5, rn, tt, harmony_hybrid
224224
* @example
225225
* ```json
226226
* {

packages/taro/types/api/storage/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ declare module '../../index' {
327327
clearStorageSync(): void
328328

329329
/** 清理本地数据缓存
330-
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony, harmony_hybrid
330+
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony_hybrid
331331
* @example
332332
* ```tsx
333333
* Taro.clearStorage()

packages/taro/types/api/taro.hooks.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,20 @@ declare module '../index' {
9898

9999
/**
100100
* 页面加载完成时的回调。
101-
* @supported weapp, h5, harmony_hybrid
101+
* @supported weapp, h5, harmony_hybrid, harmony
102102
*/
103103
useLoad<T extends {} = Record<string, any>>(callback: (param: T) => void): void
104104

105105
/**
106106
* 页面卸载时的回调。
107-
* @supported weapp, h5, harmony_hybrid
107+
* @supported weapp, h5, harmony_hybrid, harmony
108108
*/
109109
useUnload(callback: () => void): void
110110

111111
/**
112112
* 页面初次渲染完成的回调。
113113
* 此时页面已经准备妥当,可以和视图层进行交互。
114-
* @supported weapp, h5, harmony_hybrid
114+
* @supported weapp, h5, harmony_hybrid, harmony
115115
*/
116116
useReady(callback: () => void): void
117117

packages/taro/types/api/ui/tab-bar.d.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ declare module '../../index' {
121121

122122
interface TaroStatic {
123123
/** 显示 tabBar 某一项的右上角的红点
124-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
124+
* @supported weapp, h5, rn, tt, harmony_hybrid
125125
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBarRedDot.html
126126
*/
127127
showTabBarRedDot(option: showTabBarRedDot.Option): Promise<TaroGeneral.CallbackResult>
128128

129129
/** 显示 tabBar
130-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
130+
* @supported weapp, h5, rn, tt, harmony_hybrid
131131
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBar.html
132132
*/
133133
showTabBar(option?: showTabBar.Option): Promise<TaroGeneral.CallbackResult>
@@ -148,7 +148,7 @@ declare module '../../index' {
148148
setTabBarStyle(option?: setTabBarStyle.Option): Promise<TaroGeneral.CallbackResult>
149149

150150
/** 动态设置 tabBar 某一项的内容,`2.7.0` 起图片支持临时文件和网络文件。
151-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
151+
* @supported weapp, h5, rn, tt, harmony_hybrid
152152
* @example
153153
* ```tsx
154154
* Taro.setTabBarItem({
@@ -163,7 +163,7 @@ declare module '../../index' {
163163
setTabBarItem(option: setTabBarItem.Option): Promise<TaroGeneral.CallbackResult>
164164

165165
/** 为 tabBar 某一项的右上角添加文本
166-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
166+
* @supported weapp, h5, rn, tt, harmony_hybrid
167167
* @example
168168
* ```tsx
169169
* Taro.setTabBarBadge({
@@ -176,19 +176,19 @@ declare module '../../index' {
176176
setTabBarBadge(option: setTabBarBadge.Option): Promise<TaroGeneral.CallbackResult>
177177

178178
/** 移除 tabBar 某一项右上角的文本
179-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
179+
* @supported weapp, h5, rn, tt, harmony_hybrid
180180
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.removeTabBarBadge.html
181181
*/
182182
removeTabBarBadge(option: removeTabBarBadge.Option): Promise<TaroGeneral.CallbackResult>
183183

184184
/** 隐藏 tabBar 某一项的右上角的红点
185-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
185+
* @supported weapp, h5, rn, tt, harmony_hybrid
186186
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBarRedDot.html
187187
*/
188188
hideTabBarRedDot(option: hideTabBarRedDot.Option): Promise<TaroGeneral.CallbackResult>
189189

190190
/** 隐藏 tabBar
191-
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
191+
* @supported weapp, h5, rn, tt, harmony_hybrid
192192
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBar.html
193193
*/
194194
hideTabBar(option?: hideTabBar.Option): Promise<TaroGeneral.CallbackResult>

0 commit comments

Comments
 (0)