miniprogram-api-typings
Advanced tools
Comparing version 2.10.2 to 2.10.3
@@ -0,1 +1,7 @@ | ||
## 2020-03-26 v2.10.3 | ||
- 同步 API 定义到基础库 2.10.3 | ||
## 2020-03-18 v2.10.2-1 | ||
- 支持 API Promise 化调用(#105) | ||
## 2020-03-06 v2.10.2 | ||
@@ -2,0 +8,0 @@ - 同步 API 定义到基础库 2.10.2 |
{ | ||
"name": "miniprogram-api-typings", | ||
"version": "2.10.2", | ||
"version": "2.10.3", | ||
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./index.d.ts", |
@@ -34,2 +34,15 @@ /*! ***************************************************************************** | ||
type OptionalInterface<T> = { [K in keyof T]: Optional<T[K]> } | ||
interface AsyncMethodOptionLike { | ||
success?: (...args: any[]) => void | ||
} | ||
type PromisifySuccessResult< | ||
P, | ||
T extends AsyncMethodOptionLike | ||
> = P extends { success: any } | ||
? void | ||
: P extends { fail: any } | ||
? void | ||
: P extends { complete: any } | ||
? void | ||
: Promise<Parameters<Exclude<T['success'], undefined>>[0]> | ||
} |
@@ -5,3 +5,4 @@ ## 所有可用版本 | ||
-|-|- | ||
[v2.10.2](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-2-2020-02-20) | [2.10.2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.2) | `npm install miniprogram-api-typings@2.10.2` | ||
[v2.10.3](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-3-2020-03-06) | [2.10.3](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.3) | `npm install miniprogram-api-typings@2.10.3` | ||
[v2.10.2](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-2-2020-02-20) | [2.10.2-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.2-1) | `npm install miniprogram-api-typings@2.10.2-1` | ||
[v2.10.1](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-1-2020-01-14) | [2.10.1-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.1-1) | `npm install miniprogram-api-typings@2.10.1-1` | ||
@@ -8,0 +9,0 @@ [v2.10.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-0-2019-12-24) | [2.10.0-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.0-1) | `npm install miniprogram-api-typings@2.10.0-1` |
Sorry, the diff of this file is too big to display
818014
18326