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

The WechatMiniprogram.Wx don't includes key 'onAppRoute',but when I use wx,it surely has it and can be used. I extend the WechatMiniprogram.WX like this:

VKSession在类型定义里几乎没有,就只有几个方法,根本用不了 ![image](https://user-images.githubusercontent.com/13898404/175506026-fd4975f8-e52e-4407-872b-4dd4154ca626.png) ![image](https://user-images.githubusercontent.com/13898404/175505898-aac43675-a4f5-4e63-8ec0-202446d28074.png)

WxCloud”上不存在属性“Cloud”

wx.getSystemInfoSync().platform !== 'devtools' 会报错,提示不存在

https://github.com/wechat-miniprogram/api-typings/blob/aa73e6bc46f697f491fff99178a45f0401b74e8b/types/wx/lib.wx.page.d.ts#L254 在微信小程序中,我们把类型和类型的全局变量放到了一个文件里。 --- 而在支付宝小程序中: * 类型声明在 @mini-types/my 这个包。 * 全局变量在 @mini-types/global 这个包。 * @mini-types/alipay 导出了上面两个包 https://github.com/ant-mini-program/api-typings/tree/main/packages --- 模块化之后,对于跨平台的小程序库的开发,将会有极大帮助。因为库作者可以从 @mini-types/my 导入类型,而不导入类似 @mini-types/global 这样的全局变量,不会出现全局变量冲突。 现在 uniapp,支付宝小程序,微信小程序,都导出了 Page,App 等全局变量,很容易冲突。作为库的作者,希望不导入其中的任何一个全局变量。但是为了能走其类型检查,则希望导入类型。 另外,如果 A 库用了 @types/wechat-miniprogram,B...

## 环境 - api-typings 版本:3.3.2 - 系统版本:macos 10.14.6 - ide: vscode 1.57.0 ## 问题 在使用 `selectAll`时,`boundingClientRect` cb 里面的 results 是个对象,而不是数组。 ```javascript wx.createSelectorQuery().selectAll('.a-class').boundingClientRect(function(rects){ rects // d.ts 内是个对象而不是数组 }).exec() ``` ## 证明它是个问题...

Canvas 实例通过 SelectorQuery 获取, ctx.drawImage方法的 imageResource 实际不支持字符串类型。 ``` Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement...

WIP

https://raw.githubusercontent.com/wechat-miniprogram/api-typings/master/types/wx/lib.wx.api.d.ts 里面的 ```js /** 设置 type 监听单个类型的指标,设置 entryTypes 监听多个类型指标。 */ interface ObserveOption { /** 指标类型列表。不能和 type 同时使用。 */ entryTypes: string[] /** 指标类型。不能和 entryTypes 同时使用 * * 可选值: * - 'navigation':...