@ndj-fe/mp-promisify
v1.0.4
Published
Wechat miniprogram promisify apis
Downloads
3
Readme
@ndj/mp-promisify
相对于社区版本的小程序 promisify 工具库,此库提供额外的:
- 所有 promisify api 完善的 typescript 支持
- 仅对官方遗留的不能支持 promise(因为历史遗留问题)提供 promisify 支持,例如 request,downloadFile等。
- 利用爬虫,自动化同步生成更新的版本,不需要人工维护,参见脚本
config/index.ts
中使用 ndj-cli 导出的 APIgetWeixinMpApis
目前支持的 apis:
// api types
export type WxApi =
| typeof wx.getSystemInfoAsync
| typeof wx.getSkylineInfo
| typeof wx.getRendererUserAgent
| typeof wx.preloadWebview
| typeof wx.preloadSkylineView
| typeof wx.preloadAssets
| typeof wx.getShareInfo
| typeof wx.authPrivateMessage
| typeof wx.enableAlertBeforeUnload
| typeof wx.disableAlertBeforeUnload
| typeof wx.setWindowSize
| typeof wx.request
| typeof wx.downloadFile
| typeof wx.uploadFile
| typeof wx.connectSocket
| typeof wx.requestPluginPayment
| typeof wx.editImage
| typeof wx.cropImage
| typeof wx.openVideoEditor
| typeof wx.getFuzzyLocation
| typeof wx.saveFileToDisk
| typeof wx.pluginLogin
| typeof wx.login
| typeof wx.getUserInfo
| typeof wx.authorizeForMiniProgram
| typeof wx.getWeRunData
| typeof wx.checkIsAddedToMyMiniProgram
| typeof wx.openChannelsUserProfile
| typeof wx.openChannelsLive
| typeof wx.openChannelsEvent
| typeof wx.openChannelsActivity
| typeof wx.getChannelsShareKey
| typeof wx.getChannelsLiveNoticeInfo
| typeof wx.getChannelsLiveInfo
| typeof wx.requestDeviceVoIP
| typeof wx.getDeviceVoIPList
| typeof wx.getGroupEnterInfo
| typeof wx.openCustomerServiceChat
| typeof wx.chooseContact
| typeof wx.getLocalIPAddress
| typeof wx.setVisualEffectOnCapture
| typeof wx.getScreenRecordingState
| typeof wx.sendSms
| typeof wx.getInferenceEnvInfo
| typeof wx.stopFaceDetect
| typeof wx.initFaceDetect
| typeof wx.faceDetect
安装
pnpm install http://gitlab.corp.niudaji.com/h5/ndj-npm/-/archive/xxxxx.tar?private_token=Your_Token