ms-types 0.5.0 → 0.5.2

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.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/config.d.ts CHANGED
@@ -37,61 +37,4 @@ declare namespace config {
37
37
  * @example config.remove("key")
38
38
  */
39
39
  function remove(key: string): boolean;
40
-
41
- /**
42
- * 读取配置Int
43
- * @deprecated 请使用 config.get(key) 替代
44
- * @param key 配置key
45
- * @returns 配置值
46
- * @example config.readConfigInt("key")
47
- */
48
- function readConfigInt(key: string): number;
49
- /**
50
- * 读取配置Double
51
- * @deprecated 请使用 config.get(key) 替代
52
- * @param key 配置key
53
- * @returns 配置值
54
- * @example config.readConfigDouble("key")
55
- */
56
- function readConfigDouble(key: string): number;
57
- /**
58
- * 读取配置String
59
- * @deprecated 请使用 config.get(key) 替代
60
- * @param key 配置key
61
- * @returns 配置值,如果不存在返回 null
62
- * @example config.readConfigString("key")
63
- */
64
- function readConfigString(key: string): string | null;
65
- /**
66
- * 读取配置Bool
67
- * @deprecated 请使用 config.get(key) 替代
68
- * @param key 配置key
69
- * @returns 配置值
70
- * @example config.readConfigBool("key")
71
- */
72
- function readConfigBool(key: string): boolean;
73
- /**
74
- * 获取所有配置JSON
75
- * @deprecated 请使用 config.all() 替代
76
- * @returns 所有配置JSON
77
- * @example config.getConfigJSON()
78
- */
79
- function getConfigJSON(): Record<string, any>;
80
- /**
81
- * 更新配置
82
- * @deprecated 请使用 config.set(key, value) 替代
83
- * @param key 配置key
84
- * @param value 配置值
85
- * @returns 更新是否成功
86
- * @example config.updateConfig("key", 100)
87
- */
88
- function updateConfig(key: string, value: any): boolean;
89
- /**
90
- * 删除配置
91
- * @deprecated 请使用 config.remove(key) 替代
92
- * @param key 配置key
93
- * @returns 删除是否成功
94
- * @example config.deleteConfig("key")
95
- */
96
- function deleteConfig(key: string): boolean;
97
40
  }
package/types/global.d.ts CHANGED
@@ -156,6 +156,15 @@ declare function time(): number;
156
156
  */
157
157
  declare function takeMeToFront(): boolean;
158
158
 
159
+ /**
160
+ * 设置是否预加载节点(仅支持内置Agent)
161
+ * @param enable 是否预加载节点
162
+ * @description 设置是否预加载节点,默认 false
163
+ * @example
164
+ * setPreloadNode(true);
165
+ */
166
+ declare function setPreloadNode(enable: boolean): void;
167
+
159
168
  /**
160
169
  * 打印调试日志 - 输出调试级别的日志
161
170
  * 用于详细的程序执行信息、变量值和状态信息、函数调用跟踪
package/types/hid.d.ts CHANGED
@@ -69,12 +69,6 @@ declare namespace hid {
69
69
  */
70
70
  function setJitterValue(value: number): void;
71
71
 
72
- /**
73
- * 重置坐标
74
- * @param orientation 屏幕方向 可选值为"PORTRAIT"和"LANDSCAPE"
75
- */
76
- function resetPosition(orientation?: "PORTRAIT" | "LANDSCAPE"): void;
77
-
78
72
  /**
79
73
  * 移动指定坐标
80
74
  * @param x 移动坐标的X轴
@@ -71,12 +71,6 @@ declare namespace $HID {
71
71
  */
72
72
  function 设置抖动值(抖动值: 数字): 无返回值;
73
73
 
74
- /**
75
- * 重置坐标
76
- * @param 屏幕方向 可选值为"PORTRAIT"和"LANDSCAPE"
77
- */
78
- function 重置坐标(屏幕方向?: "PORTRAIT" | "LANDSCAPE"): 无返回值;
79
-
80
74
  /**
81
75
  * 移动指定坐标
82
76
  * @param 坐标x 移动坐标的X轴
@@ -140,6 +140,15 @@ declare function $获取当前时间戳(): 数字;
140
140
  */
141
141
  declare function $APP切入前台(): 无返回值;
142
142
 
143
+ /**
144
+ * 设置是否预加载节点(仅支持内置Agent)
145
+ * @param enable 是否预加载节点
146
+ * @description 设置是否预加载节点,默认 false
147
+ * @example
148
+ * $设置预加载节点(true);
149
+ */
150
+ declare function $设置预加载节点(enable: 布尔值): 无返回值;
151
+
143
152
  /**
144
153
  * 打印调试日志 - 输出调试级别的日志
145
154
  * 用于详细的程序执行信息、变量值和状态信息、函数调用跟踪
@@ -39,61 +39,4 @@ declare namespace $配置 {
39
39
  * @example $配置.删除("key")
40
40
  */
41
41
  function 删除(配置键: 字符串): 布尔值;
42
-
43
- /**
44
- * 读取配置Int
45
- * @deprecated 请使用 $配置.获取(配置键) 替代
46
- * @param 配置键 配置key
47
- * @returns 配置值
48
- * @example $配置.读取整数("key")
49
- */
50
- function 读取整数(配置键: 字符串): 数字;
51
- /**
52
- * 读取配置Double
53
- * @deprecated 请使用 $配置.获取(配置键) 替代
54
- * @param 配置键 配置key
55
- * @returns 配置值
56
- * @example $配置.读取浮点数("key")
57
- */
58
- function 读取浮点数(配置键: 字符串): 数字;
59
- /**
60
- * 读取配置String
61
- * @deprecated 请使用 $配置.获取(配置键) 替代
62
- * @param 配置键 配置key
63
- * @returns 配置值,如果不存在返回 null
64
- * @example $配置.读取字符串("key")
65
- */
66
- function 读取字符串(配置键: 字符串): 字符串 | null;
67
- /**
68
- * 读取配置Bool
69
- * @deprecated 请使用 $配置.获取(配置键) 替代
70
- * @param 配置键 配置key
71
- * @returns 配置值
72
- * @example $配置.读取布尔值("key")
73
- */
74
- function 读取布尔值(配置键: 字符串): 布尔值;
75
- /**
76
- * 获取所有配置JSON
77
- * @deprecated 请使用 $配置.所有配置() 替代
78
- * @returns 所有配置JSON
79
- * @example $配置.读取所有配置()
80
- */
81
- function 读取所有配置(): 字典<任意类型>;
82
- /**
83
- * 更新配置
84
- * @deprecated 请使用 $配置.设置(配置键, 配置值) 替代
85
- * @param 配置键 配置key
86
- * @param 配置值 配置值
87
- * @returns 更新是否成功
88
- * @example $配置.更新配置("key", 100)
89
- */
90
- function 更新配置(配置键: 字符串, 配置值: 任意类型): 布尔值;
91
- /**
92
- * 删除配置
93
- * @deprecated 请使用 $配置.删除(配置键) 替代
94
- * @param 配置键 配置key
95
- * @returns 删除是否成功
96
- * @example $配置.删除配置("key")
97
- */
98
- function 删除配置(配置键: 字符串): 布尔值;
99
42
  }