Skip to content

Commit

Permalink
Merge pull request #14 from wtto00/dev
Browse files Browse the repository at this point in the history
回调函数的参数类型,类型参数是可选的
  • Loading branch information
wtto00 authored Mar 24, 2023
2 parents 448bcd8 + 0cddc8b commit d2ab102
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ declare module WX {
* 用户取消时:"xxx:cancel",其中xxx为调用的接口名
* 调用失败时:其值为具体错误信息
*/
type CommonApiOptionsCallbackParams<T> = {
type CommonApiOptionsCallbackParams<T extends Record = {}> = {
[key: string]: any
errMsg: string
} & T
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wtto00/jweixin-esm",
"version": "1.6.0-1",
"version": "1.6.0-2",
"description": "微信JSSDK ESM模块 附带TS类型以及详细注释",
"type": "module",
"exports": "./lib/jweixin-1.6.0.esm.js",
Expand Down

0 comments on commit d2ab102

Please sign in to comment.