Skip to content

Commit e12a5af

Browse files
authored
🤖 Merge PR DefinitelyTyped#74148 [wx-js-sdk-browser] fix type definition in checkJsApi by @keqingrong
1 parent 031b285 commit e12a5af

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

types/wx-js-sdk-browser/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ declare namespace wx {
105105
* 以键值对的形式返回,可用的 api 值 true,不可用为 false
106106
* 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
107107
*/
108-
success(res: { checkResult: { [methodName: string]: boolean }; errMsg: { msg: string } }): void;
108+
success(res: { checkResult: { [methodName: string]: boolean }; errMsg: string }): void;
109109
}
110110

111111
/**

types/wx-js-sdk-browser/wx-js-sdk-browser-tests.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ wx.checkJsApi({
1818
jsApiList: [""],
1919
success: res => {
2020
res.checkResult;
21-
if (res.errMsg) {
22-
res.errMsg.msg;
23-
}
21+
res.errMsg;
2422
},
2523
complete: () => {
2624
},

0 commit comments

Comments
 (0)