miniprogram-api-typings
Advanced tools
Comparing version 3.4.2 to 3.4.3
@@ -0,1 +1,5 @@ | ||
## 2021-08-24 v3.4.3 | ||
- 更新 API 定义到 2.19.2 | ||
- 补充自定义组件获取更新性能接口定义 | ||
## 2021-08-02 v3.4.2 | ||
@@ -2,0 +6,0 @@ - 更新 API 定义到 2.19.0 |
{ | ||
"name": "miniprogram-api-typings", | ||
"version": "3.4.2", | ||
"version": "3.4.3", | ||
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./index.d.ts", |
@@ -41,3 +41,5 @@ /*! ***************************************************************************** | ||
T extends AsyncMethodOptionLike | ||
> = P extends { success: any } | ||
> = P extends { | ||
success: any | ||
} | ||
? void | ||
@@ -44,0 +46,0 @@ : P extends { fail: any } |
@@ -273,3 +273,18 @@ /*! ***************************************************************************** | ||
): void | ||
/** | ||
* 当从另一页面跳转到该页面时,获得与来源页面实例通信当事件通道,详见 [wx.navigateTo]((wx.navigateTo)) | ||
* | ||
* 最低基础库版本:[`2.7.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | ||
*/ | ||
getOpenerEventChannel(): EventChannel | ||
/** | ||
* 获取更新性能统计信息,详见 [获取更新性能统计信息]((custom-component/update-perf-stat)) | ||
* | ||
* | ||
* 最低基础库版本:[`2.12.0`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | ||
*/ | ||
setUpdatePerformanceListener<WithDataPath extends boolean = false>( | ||
options: SetUpdatePerformanceListenerOption<WithDataPath>, | ||
callback?: UpdatePerformanceListener<WithDataPath> | ||
): void | ||
} | ||
@@ -627,2 +642,26 @@ | ||
} | ||
interface SetUpdatePerformanceListenerOption<WithDataPath> { | ||
/** 是否返回变更的 data 字段信息 */ | ||
withDataPaths?: WithDataPath | ||
} | ||
interface UpdatePerformanceListener<WithDataPath> { | ||
(res: UpdatePerformance<WithDataPath>): void | ||
} | ||
interface UpdatePerformance<WithDataPath> { | ||
/** 此次更新过程的 ID */ | ||
updateProcessId: number | ||
/** 对于子更新,返回它所属的更新过程 ID */ | ||
parentUpdateProcessId?: number | ||
/** 是否是被合并更新,如果是,则 updateProcessId 表示被合并到的更新过程 ID */ | ||
isMergedUpdate: boolean | ||
/** 此次更新的 data 字段信息,只有 withDataPaths 设为 true 时才会返回 */ | ||
dataPaths: WithDataPath extends true ? string[] : undefined | ||
/** 此次更新进入等待队列时的时间戳 */ | ||
pendingStartTimestamp: number | ||
/** 更新运算开始时的时间戳 */ | ||
updateStartTimestamp: number | ||
/** 更新运算结束时的时间戳 */ | ||
updateEndTimestamp: number | ||
} | ||
} | ||
@@ -629,0 +668,0 @@ /** Component构造器可用于定义组件,调用Component构造器时可以指定组件的属性、数据、方法等。 |
Sorry, the diff of this file is too big to display
1206725
27674