ms-types 0.9.34 → 0.9.36

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.9.34",
3
+ "version": "0.9.36",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/hid.d.ts CHANGED
@@ -110,6 +110,13 @@ declare namespace hid {
110
110
  */
111
111
  function setJitterValue(value: number): void;
112
112
 
113
+ /**
114
+ * 设置连续点击/滑动之间的等待毫秒。不调用时用固件默认(相对 200ms / 绝对 100ms)。
115
+ * @param milliseconds 0 关闭等待,大于 0 覆盖为指定毫秒,-1 恢复默认
116
+ * @returns 操作是否成功
117
+ */
118
+ function setActionDelay(milliseconds: number): boolean;
119
+
113
120
  /**
114
121
  * 移动指定坐标
115
122
  * @param x 移动坐标的X轴
@@ -117,8 +117,11 @@ function _Action.pressButton(name) return true end
117
117
  --- @return boolean 成功与否
118
118
  function _Action.sendKey(keys) return true end
119
119
 
120
+ ---@class W3CActionsJson
121
+ ---@field actions table<string, any>[] W3C action 序列
122
+
120
123
  --- 执行 W3C Actions JSON
121
- --- @param json table W3C Actions 请求体
124
+ --- @param json W3CActionsJson W3C Actions 请求体
122
125
  --- @return boolean 成功与否
123
126
  function _Action.w3cActions(json) return true end
124
127
 
@@ -20,12 +20,12 @@ function _Cloud.disconnect() end
20
20
 
21
21
  --- report
22
22
  ---@param event string
23
- ---@param data table
23
+ ---@param data table<string, any>
24
24
  ---@return boolean
25
25
  function _Cloud.report(event, data) return false end
26
26
 
27
27
  --- onEvent
28
- ---@param callback fun(event:string, data:table)|nil
28
+ ---@param callback fun(event: string, data: table<string, any>)|nil
29
29
  function _Cloud.onEvent(callback) end
30
30
 
31
31
  ---@type Cloud