miniprogram-api-typings
Advanced tools
Comparing version 2.8.0-1 to 2.8.0-2
@@ -0,1 +1,12 @@ | ||
## 2019-08-20 v2.8.0-2 | ||
- 将 `object` 改为 `Record<string, any>`,以允许任意属性和方法 | ||
- 自定义组件属性构造器为 `ObjectConstructor` 时,类型推导为 `Record<string, any>` 而不是 `object` | ||
- 修正 `component` 参数的类型为页面或自定义组件实例 | ||
- 修正一些其他的接口类型错误 | ||
## 2019-08-14 v2.8.0-2 | ||
- 补齐 `styleIsolation` 到 `ComponentOption` | ||
## 2019-08-14 v2.8.0 | ||
@@ -2,0 +13,0 @@ |
{ | ||
"name": "miniprogram-api-typings", | ||
"version": "2.8.0-1", | ||
"version": "2.8.0-2", | ||
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript", | ||
"main": "./index.d.ts", | ||
"types": "./index.d.ts", | ||
"scripts": { | ||
"test": "mkdir -p ~/.dts && dtslint . --localTs ./node_modules/typescript/lib", | ||
"dtslint": "npm test" | ||
}, | ||
"repository": { | ||
@@ -11,8 +15,22 @@ "type": "git", | ||
}, | ||
"author": "wechat-miniprogram", | ||
"license": "MIT", | ||
"author": "Wechat Miniprogram <wx-miniprogram@qq.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/wechat-miniprogram/api-typings/issues" | ||
}, | ||
"homepage": "https://github.com/wechat-miniprogram/api-typings#readme" | ||
"homepage": "https://github.com/wechat-miniprogram/api-typings#readme", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"dtslint": "^0.9.1", | ||
"typescript": "^3.5.3" | ||
}, | ||
"files": [ | ||
"LICENSE", | ||
"CHANGELOG.md", | ||
"README.md", | ||
"README-en.md", | ||
"index.d.ts", | ||
"typings.json", | ||
"types/" | ||
] | ||
} |
@@ -29,3 +29,3 @@ # Wechat Mini Program API Typings | ||
-|-|- | ||
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0-1) | `npm install miniprogram-api-typings@2.8.0-1` | ||
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0-2) | `npm install miniprogram-api-typings@2.8.0-2` | ||
[v2.7.7](https://developers.weixin.qq.com/miniprogram/dev/framework/release/) | [2.7.7-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.7.7-2) | `npm install miniprogram-api-typings@2.7.7-2` | ||
@@ -39,2 +39,12 @@ [v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-6-5-2019-04-02) | [2.6.5-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.6.5-2) | `npm install miniprogram-api-typings@2.6.5-2` | ||
Since definitions are auto-generated together with [documentations](https://developers.weixin.qq.com/miniprogram/dev/index.html), all PRs will __not__ be merged. If you have any bug reports or suggestions, create an issue instead. Thanks for contributing! | ||
Definitions of Wechat APIs (`lib.wx.api.d.ts`) are auto-generated together with our [documentations](https://developers.weixin.qq.com/miniprogram/dev/index.html), therefore PRs including that file will __not__ be merged. If you found some APIs defined wrongly, create an issue instead. | ||
Both PR and issue are welcomed for definitions of pages (`Page`), custom components (`Component`) and other else, since they are written manually. Help us improve this definition if you have any bug reports or suggestions! Thanks for contributing! | ||
### Automated tests | ||
We use [`dtslint`](https://github.com/Microsoft/dtslint) to check if this definition is working properly. All test cases are under folder `test`. | ||
To perform an automated test, clone this repo, `npm install --save-dev` and `npm test`. | ||
If you have test case that fails the test, an issue or PR will be great. Strong test case that passes are also welcomed. |
@@ -28,3 +28,3 @@ # 微信小程序定义文件 | ||
-|-|- | ||
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0-1) | `npm install miniprogram-api-typings@2.8.0-1` | ||
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0-2) | `npm install miniprogram-api-typings@2.8.0-2` | ||
[v2.7.7](https://developers.weixin.qq.com/miniprogram/dev/framework/release/) | [2.7.7-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.7.7-2) | `npm install miniprogram-api-typings@2.7.7-2` | ||
@@ -38,2 +38,12 @@ [v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-6-5-2019-04-02) | [2.6.5-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.6.5-2) | `npm install miniprogram-api-typings@2.6.5-2` | ||
定义文件是随 [文档](https://developers.weixin.qq.com/miniprogram/dev/index.html) 一起自动生成的,所以所有的 PR 都将 __不会__ 被接受。如果您有 bug 反馈或建议,请提一个 issue 给我们。非常感谢! | ||
API 的定义文件(`lib.wx.api.d.ts`)是随 [文档](https://developers.weixin.qq.com/miniprogram/dev/index.html) 一起自动生成的,如果发现了 API 接口的定义错误,请提一个 issue 给我们,关于 API 的 PR 将 __不会__ 被接受。 | ||
如果有针对页面(`Page`)、自定义组件(`Component`)等接口的 bug 和建议,欢迎 PR 或提一个 issue 给我们。非常感谢! | ||
### 测试 | ||
本定义文件使用 [`dtslint`](https://github.com/Microsoft/dtslint) 进行测试,所有的测试样例放在 `test` 目录下。 | ||
想执行测试的话,克隆本项目并完成 `npm install --save-dev` 后执行 `npm test` 即可。 | ||
如果您发现了不能通过自动化测试的测试样例,可以提交 PR 或者提一个 issue。当然,能通过自动化测试的强有力的测试样例也是欢迎的。 |
@@ -78,3 +78,3 @@ /*! ***************************************************************************** | ||
? any[] | ||
: T extends ObjectConstructor ? object : any | ||
: T extends ObjectConstructor ? IAnyObject : any | ||
interface FullProperty<T extends PropertyType> { | ||
@@ -81,0 +81,0 @@ /** 属性类型 */ |
Sorry, the diff of this file is too big to display
696939
48
2
15973