@lark-apaas/client-toolkit 1.2.24-alpha.16 → 1.2.24-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,12 @@
9
9
  * @see docs/RFC_HMR_API.md
10
10
  */
11
11
  export interface HmrApi {
12
+ /**
13
+ * 注册 HMR 更新前回调(模块替换之前触发)
14
+ * @param callback 回调函数
15
+ * @returns cleanup 函数,用于取消注册
16
+ */
17
+ onBeforeApply?(callback: () => void): () => void;
12
18
  /**
13
19
  * 注册 HMR 成功回调
14
20
  * @param callback 成功回调函数
@@ -24,7 +30,7 @@ export interface HmrApi {
24
30
  }
25
31
  declare global {
26
32
  interface Window {
27
- __VITE_HMR__?: HmrApi;
33
+ __VITE_HMR__?: Required<HmrApi>;
28
34
  }
29
35
  }
30
36
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/client-toolkit",
3
- "version": "1.2.24-alpha.16",
3
+ "version": "1.2.24-alpha.18",
4
4
  "types": "./lib/index.d.ts",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -103,7 +103,7 @@
103
103
  "@lark-apaas/auth-sdk": "^0.1.2",
104
104
  "@lark-apaas/client-capability": "^0.1.6",
105
105
  "@lark-apaas/internal-slardar": "^0.0.3",
106
- "@lark-apaas/miaoda-inspector": "1.0.14-alpha.27",
106
+ "@lark-apaas/miaoda-inspector": "1.0.14-alpha.28",
107
107
  "@lark-apaas/observable-web": "^1.0.4",
108
108
  "@radix-ui/react-avatar": "^1.1.10",
109
109
  "@radix-ui/react-popover": "^1.1.15",