ms-types 0.3.18 → 0.3.19
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.
package/package.json
CHANGED
package/types/global.d.ts
CHANGED
|
@@ -58,10 +58,29 @@ declare const __package__: {
|
|
|
58
58
|
[key: string]: any;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
declare const sharedState: {
|
|
62
|
+
/**
|
|
63
|
+
* 设置共享状态
|
|
64
|
+
* @param key 状态键
|
|
65
|
+
* @param value 状态值
|
|
66
|
+
*/
|
|
67
|
+
set: (key: string, value: any) => void;
|
|
68
|
+
/**
|
|
69
|
+
* 获取共享状态
|
|
70
|
+
* @param key 状态键
|
|
71
|
+
* @returns 状态值
|
|
72
|
+
*/
|
|
73
|
+
get: (key: string) => any;
|
|
74
|
+
/**
|
|
75
|
+
* 批量操作共享状态
|
|
76
|
+
* @param block 批量操作代码块
|
|
77
|
+
*/
|
|
78
|
+
withBatch: (block: () => void) => void;
|
|
79
|
+
/**
|
|
80
|
+
* 清除所有共享状态
|
|
81
|
+
*/
|
|
82
|
+
clear: () => void;
|
|
83
|
+
};
|
|
65
84
|
|
|
66
85
|
/**
|
|
67
86
|
* 设置停止回调(仅主线程调用)
|
|
@@ -46,10 +46,29 @@ declare const $脚本配置: {
|
|
|
46
46
|
[key: 字符串]: 任意类型;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
declare const $共享状态: {
|
|
50
|
+
/**
|
|
51
|
+
* 设置共享状态
|
|
52
|
+
* @param key 状态键
|
|
53
|
+
* @param value 状态值
|
|
54
|
+
*/
|
|
55
|
+
设置: (key: 字符串, value: 任意类型) => 无返回值;
|
|
56
|
+
/**
|
|
57
|
+
* 获取共享状态
|
|
58
|
+
* @param key 状态键
|
|
59
|
+
* @returns 状态值
|
|
60
|
+
*/
|
|
61
|
+
获取: (key: 字符串) => 任意类型;
|
|
62
|
+
/**
|
|
63
|
+
* 批量操作共享状态
|
|
64
|
+
* @param block 批量操作代码块
|
|
65
|
+
*/
|
|
66
|
+
批量操作: (block: () => 无返回值) => 无返回值;
|
|
67
|
+
/**
|
|
68
|
+
* 清除所有共享状态
|
|
69
|
+
*/
|
|
70
|
+
清除所有共享状态: () => 无返回值;
|
|
71
|
+
};
|
|
53
72
|
|
|
54
73
|
/**
|
|
55
74
|
* 设置停止回调(仅主线程调用)
|