api-typings icon indicating copy to clipboard operation
api-typings copied to clipboard

Type definitions for APIs of Wechat Mini Program in TypeScript

Results 100 api-typings issues
Sort by recently updated
recently updated
newest added

拷贝的官方文档 `await db.collection('todos').where({ done: false }).update({ data: { progress: 1 }})`

#### `TProperty`有两个问题: 1. `TProperty`和`TMethod`都提示必须要补充索引签名,这个是不是有问题? ![image](https://user-images.githubusercontent.com/29689307/63502134-7c24c580-c4ff-11e9-83ab-daa6aed84978.png) 2. `TProperty`无法对值进行类型约束,我看`component.d.ts`里是根据`type`而不是根据`value`来约束的。 - 比如数组只能约束到写死的`any[]`: ```ts type ValueType = T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean...

Any reason why there is no typing for wx.serviceMarket especially invokeService api? Different service api require different input/output - it can be easily done via generics. Any plan to add...

```ts wx.createSelectorQuery().selectAll('.section').boundingClientRect(res => { res.forEach(e => console.log(e.bottom)) // res.forEach报错, e.bottom 为 any }) ``` `boundingClientRect` 以及 `scrollOffset` 的回调有些许问题。 参考 #194

根据 MDN 上的介绍, OffscreenCanvas 拥有widht 和height , 但是 你们的文档还有 定义上都没有, 我就好奇了, 这是一张无限大的canvas 么? 如果绘制超出左侧和顶部边界会被裁切还是保留?

想要这样的效果 ``` interface CallFunctionResult extends IAPISuccessParam { result: T } callFunction(param: OQ): Promise ```

``` /** 订阅消息设置 */ interface SubscriptionsSetting { /** 每一项订阅消息的订阅状态。itemSettings对象的键为**一次性订阅消息的模板id**或**系统订阅消息的类型**,值为'accept'、'reject'、'ban'中的其中一种。'accept'表示用户同意订阅这条消息,'reject'表示用户拒绝订阅这条消息,'ban'表示已被后台封禁。一次性订阅消息使用方法详见 [wx.requestSubscribeMessage](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/subscribe-message/wx.requestSubscribeMessage.html),永久订阅消息(仅小游戏可用)使用方法详见[wx.requestSubscribeSystemMessage](/minigame/dev/api/open-api/subscribe-message/wx.requestSubscribeSystemMessage.html) */ itemSettings: IAnyObject /** 订阅消息总开关,true为开启,false为关闭 */ mainSwitch: boolean } ``` 现在是IAnyObject,不过既然已经知道是有哪些会返回哪些,所以希望是 ``` interface SubscriptionsSetting { itemSettings: Record

- add prettier We are using DefinitelyTyped's prettier config, and I placed it in package.json instead of a standalone config files - update eslint config with type checking - Mirgate...

我给 `component` options里扩展了一个属性选项computed,我需要给它编写类型定义, 场景: ``` Component({ computed: { sum(data) { return 1; } } }); ``` 但是发现并没有提供相关扩展: https://github.com/wechat-miniprogram/api-typings/blob/c7fb54c1274f2827aa7852071a4a1813aa9fcea2/types/wx/lib.wx.component.d.ts#L47 但是Page是提供了`CustomOption`来方便用户进行自定义属性值或者函数扩展的: https://github.com/wechat-miniprogram/api-typings/blob/c7fb54c1274f2827aa7852071a4a1813aa9fcea2/types/wx/lib.wx.page.d.ts#L39 希望能和Page一样提供一下自定义扩展类型

https://github.com/wechat-miniprogram/api-typings/blob/master/types/wx/lib.wx.api.d.ts#L7358 中api写的第一个参数`ImageSource`为`string` 实际为 `Image` 对象,必须先用 ```ts const img = canvas.createImage(); ``` 创建`Image`对象后,再使用将此img对象进行绘制