Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

Commit

Permalink
feat(baselib): definition for 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SgLy committed Jan 7, 2020
1 parent f62b1c3 commit 1428227
Show file tree
Hide file tree
Showing 12 changed files with 630 additions and 85 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2020-01-07 v2.10.0
- 同步 API 定义到基础库 2.10.0

## 2019-12-20 v2.9.4
- 同步 API 定义到基础库 2.9.4
- 修正一些接口错误(#88#89#91
Expand Down
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

基础库版本|npm 版本|命令
-|-|-
[v2.10.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-0-2019-12-24) | [2.10.0](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.0) | `npm install [email protected]`
[v2.9.4](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-9-4-2019-11-28) | [2.9.4](https://www.npmjs.com/package/miniprogram-api-typings/v/2.9.4) | `npm install [email protected]`
[v2.9.3](https://developers.weixin.qq.com/miniprogram/dev/framework/release/) | [2.9.3](https://www.npmjs.com/package/miniprogram-api-typings/v/2.9.3) | `npm install [email protected]`
[v2.9.2](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-9-2-2019-11-04) | [2.9.2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.9.2) | `npm install [email protected]`
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "miniprogram-api-typings",
"version": "2.9.4",
"version": "2.10.0",
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript",
"main": "./index.d.ts",
"types": "./index.d.ts",
Expand Down
13 changes: 13 additions & 0 deletions test/api_doc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3041,3 +3041,16 @@ import { expectType } from 'tsd'
},
})
}

// Test case from `wx.getSetting`
{
wx.getSetting({
withSubscriptions: true,
success(res) {
expectType<WechatMiniprogram.AuthSetting>(res.authSetting)
expectType<boolean | undefined>(res.authSetting['scope.userInfo'])
expectType<boolean | undefined>(res.authSetting['scope.subscribeMessage'])
expectType<Record<string, any>>(res.subscriptionsSetting)
},
})
}
2 changes: 1 addition & 1 deletion types/wx/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! *****************************************************************************
Copyright (c) 2019 Tencent, Inc. All rights reserved.
Copyright (c) 2020 Tencent, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
Loading

0 comments on commit 1428227

Please sign in to comment.