Skip to content

Commit

Permalink
fix(weapp): promisify wx.chooseContact
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKonka committed Nov 29, 2022
1 parent 8023667 commit 450a506
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions packages/taro-weapp/src/apis-list.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
export const needPromiseApis = new Set([
'authPrivateMessage',
'chooseContact',
'cropImage',
'disableAlertBeforeUnload',
'editImage',
'enableAlertBeforeUnload',
'getBackgroundFetchData',
'getFuzzyLocation',
'getGroupEnterInfo',
'getLocalIPAddress',
'getShareInfo',
'getUserProfile',
'getWeRunData',
'join1v1Chat',
'openCustomerServiceChat',
'openVideoEditor',
'saveFileToDisk',
'scanItem',
'setEnable1v1Chat',
'setWindowSize',
'sendBizRedPacket',
'startFacialRecognitionVerify',
'openCustomerServiceChat',
'getLocalIPAddress',
'getUserProfile',
'editImage',
'getFuzzyLocation',
'cropImage'
])
2 changes: 1 addition & 1 deletion packages/taro/types/api/device/contact.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ declare module '../../index' {
* @supported weapp
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/contact/wx.chooseContact.html
*/
chooseContact(option: chooseContact.Option): Promise<TaroGeneral.CallbackResult>
chooseContact(option: chooseContact.Option): Promise<chooseContact.SuccessCallbackResult>
/** 添加手机通讯录联系人。用户可以选择将该表单以「新增联系人」或「添加到已有联系人」的方式,写入手机系统通讯录。
* @supported weapp
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/contact/wx.addPhoneContact.html
Expand Down

0 comments on commit 450a506

Please sign in to comment.