ms-types 0.4.3 → 0.4.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-types",
3
- "version": "0.4.3",
3
+ "version": "0.4.6",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/config.d.ts CHANGED
@@ -8,6 +8,13 @@ declare namespace config {
8
8
  * @example config.all()
9
9
  */
10
10
  function all(): Record<string, any>;
11
+ /**
12
+ * 设置所有配置项
13
+ * @param config 包含所有配置项的字典
14
+ * @returns 如果设置成功返回true,否则返回false
15
+ * @example config.setAll({"key": 100})
16
+ */
17
+ function setAll(config: Record<string, any>): boolean;
11
18
  /**
12
19
  * 设置配置
13
20
  * @param key 配置key
package/types/hid.d.ts CHANGED
@@ -293,7 +293,7 @@ declare namespace hid {
293
293
  function takeMeToFront(): boolean;
294
294
 
295
295
  /**
296
- * 获取当前打开应用信息(仅 IOS18+)
296
+ * 获取当前打开应用信息(仅 IOS18.6+)
297
297
  * @returns 当前打开应用信息
298
298
  */
299
299
  function currentAppInfo(): {
package/types/ui.d.ts CHANGED
@@ -62,6 +62,13 @@ declare namespace ms {
62
62
  */
63
63
  function getAllConfig(): Promise<Record<string, any>>;
64
64
 
65
+ /**
66
+ * 设置所有配置项
67
+ * @param config 包含所有配置项的字典
68
+ * @returns 如果设置成功返回true,否则返回false
69
+ */
70
+ function setAllConfig(config: Record<string, any>): Promise<boolean>;
71
+
65
72
  /**
66
73
  * 获取服务器设备ID
67
74
  * @returns 服务器设备ID
@@ -297,7 +297,7 @@ declare namespace $HID {
297
297
  function APP切入前台(): 布尔值;
298
298
 
299
299
  /**
300
- * 获取当前打开应用信息(仅 IOS18+)
300
+ * 获取当前打开应用信息(仅 IOS18.6+)
301
301
  * @returns 当前打开应用信息
302
302
  */
303
303
  function 当前打开应用信息(): {
@@ -10,6 +10,13 @@ declare namespace $配置 {
10
10
  * @example $配置.所有配置()
11
11
  */
12
12
  function 所有配置(): 字典<任意类型>;
13
+ /**
14
+ * 设置所有配置项
15
+ * @param config 包含所有配置项的字典
16
+ * @returns 如果设置成功返回true,否则返回false
17
+ * @example $配置.设置所有({"key": 100})
18
+ */
19
+ function 设置所有(config: 字典<任意类型>): 布尔值;
13
20
  /**
14
21
  * 设置配置
15
22
  * @param 配置键 配置key