We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9ab0c8b + 5625675 commit b60cb4bCopy full SHA for b60cb4b
test/page.test.ts
@@ -83,7 +83,7 @@ Page({
83
onUnload() {},
84
onPullDownRefresh() {},
85
onShareAppMessage(res) {
86
- expectType<string>(res.from)
+ expectType<'button' | 'menu'>(res.from)
87
if (res.from === 'button') {
88
expectType<string | undefined>(res.webViewUrl)
89
}
types/wx/lib.wx.page.d.ts
@@ -199,7 +199,7 @@ declare namespace WechatMiniprogram.Page {
199
*
200
* 最低基础库: `1.2.4`
201
*/
202
- from: 'button' | 'menu' | string
+ from: 'button' | 'menu'
203
/** 如果 `from` 值是 `button`,则 `target` 是触发这次转发事件的 `button`,否则为 `undefined`
204
205
* 最低基础库: `1.2.4` */
0 commit comments