Skip to content

Commit

Permalink
fix(taro): 修复 setClipboardData 错误的返回类型
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfield550 committed Oct 23, 2019
1 parent a94897d commit bea4b44
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/taro/types/api/device/device.clipboard.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
declare namespace Taro {
namespace setClipboardData {
type Promised = {
/**
* 错误信息
*/
errMsg: string
/**
* 剪贴板的内容
*/
data: string
}
type Param = {
/**
* 需要设置的内容
Expand All @@ -11,6 +21,8 @@ declare namespace Taro {
* @since 1.1.0
*
* 设置系统剪贴板的内容
*
* **注意** 调用成功后,会弹出 toast 提示"内容已复制",持续 1.5s
*
* **示例代码:**
*
Expand All @@ -28,10 +40,14 @@ declare namespace Taro {
```
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/clipboard/wx.setClipboardData.html
*/
function setClipboardData(OBJECT: setClipboardData.Param): Promise<any>
function setClipboardData(OBJECT: setClipboardData.Param): Promise<setClipboardData.Promised>

namespace getClipboardData {
type Promised = {
/**
* 错误信息
*/
errMsg: string
/**
* 剪贴板的内容
*/
Expand Down

0 comments on commit bea4b44

Please sign in to comment.