ms-types 0.0.69 → 0.0.70

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.0.69",
3
+ "version": "0.0.70",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -55,14 +55,14 @@ declare namespace $MySQL数据库 {
55
55
  * $打印信息日志("数据库连接成功")
56
56
  * }
57
57
  */
58
- function 连接(config: MySQL连接配置): 布尔值;
58
+ function 连接(连接配置: MySQL连接配置): 布尔值;
59
59
 
60
60
  /**
61
61
  * 断开数据库连接
62
62
  * @example
63
63
  * $MySQL数据库.断开连接()
64
64
  */
65
- function 断开连接(): void;
65
+ function 断开连接(): 无返回值;
66
66
 
67
67
  /**
68
68
  * 检查连接状态
@@ -82,7 +82,7 @@ declare namespace $YOLO {
82
82
  目标检测输入大小?: 数字,
83
83
  置信度?: 数字,
84
84
  重叠阈值?: 数字
85
- ): Yolo检测结果[];
85
+ ): 数组<Yolo检测结果>;
86
86
 
87
87
  /**
88
88
  * 释放指定模型资源
@@ -64,13 +64,13 @@ declare namespace $图片 {
64
64
  * @param path 图片路径
65
65
  * @returns 图片id ,如果读取失败则返回null
66
66
  * @example
67
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
67
+ * const 图片ID = $图片.读取图片("screen.jpg")
68
68
  * if (图片ID) {
69
69
  * $图片.保存图片(图片ID, "screen.jpg")
70
70
  * }
71
71
  * $图片.释放图片(图片ID)
72
72
  */
73
- function 从文件读取图片(图片路径: 字符串): 字符串 | null;
73
+ function 读取图片(图片路径: 字符串): 字符串 | null;
74
74
  /**
75
75
  * 读取资源图片
76
76
  * @param fileName 文件名
@@ -85,7 +85,7 @@ declare namespace $图片 {
85
85
  * @param degree 旋转角度 只能是 90 -90 180
86
86
  * @returns 旋转后的图片id ,如果旋转失败则返回null
87
87
  * @example
88
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
88
+ * const 图片ID = $图片.读取图片("screen.jpg")
89
89
  * if (图片ID) {
90
90
  * const 新图片ID = $图片.旋转图片(图片ID, 90)
91
91
  * if (新图片ID) {
@@ -106,7 +106,7 @@ declare namespace $图片 {
106
106
  * @param 区域右下角y 全屏传0
107
107
  * @returns true 相同 false 不同
108
108
  * @example
109
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
109
+ * const 图片ID = $图片.读取图片("screen.jpg")
110
110
  * if (图片ID) {
111
111
  * const isSame = $图片.多点比色(图片ID, "1|2|#6DD1E6-#101010", 10, 0, 0, 100, 100)
112
112
  * if (isSame) {
@@ -137,7 +137,7 @@ declare namespace $图片 {
137
137
  * @param 查找方向 1-8
138
138
  * @returns 颜色点数组
139
139
  * @example
140
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
140
+ * const 图片ID = $图片.读取图片("screen.jpg")
141
141
  * if (图片ID) {
142
142
  * const 颜色点数组 = $图片.单点找色(图片ID, "0x6DD1E6-0x101010", 10, 0, 0, 100, 100, 1, 1)
143
143
  * if (颜色点数组.length > 0) {
@@ -171,7 +171,7 @@ declare namespace $图片 {
171
171
  * @param 查找方向 1-8
172
172
  * @returns 颜色点数组
173
173
  * @example
174
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
174
+ * const 图片ID = $图片.读取图片("screen.jpg")
175
175
  * if (图片ID) {
176
176
  * const 颜色点数组 = $图片.多点找色(图片ID, "0x6DD1E6-0x101010", 10, "1|2|#6DD1E6-#101010", 0, 0, 100, 100, 1, 1)
177
177
  * if (颜色点数组.length > 0) {
@@ -240,7 +240,7 @@ declare namespace $图片 {
240
240
  * @param 区域右下角y
241
241
  * @returns 裁剪后的图片ID
242
242
  * @example
243
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
243
+ * const 图片ID = $图片.读取图片("screen.jpg")
244
244
  * if (图片ID) {
245
245
  * const 裁剪后的图片ID = $图片.裁剪图片(图片ID, 0, 0, 100, 100)
246
246
  * if (裁剪后的图片ID) {
@@ -263,7 +263,7 @@ declare namespace $图片 {
263
263
  * @param 坐标y
264
264
  * @returns 颜色值
265
265
  * @example
266
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
266
+ * const 图片ID = $图片.读取图片("screen.jpg")
267
267
  * if (图片ID) {
268
268
  * const 颜色值 = $图片.取像素颜色(图片ID, 0, 0)
269
269
  * $打印信息日志(颜色值)
@@ -276,7 +276,7 @@ declare namespace $图片 {
276
276
  * @param 颜色值
277
277
  * @returns 16进制RGB字符串
278
278
  * @example
279
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
279
+ * const 图片ID = $图片.读取图片("screen.jpg")
280
280
  * if (图片ID) {
281
281
  * const 颜色值 = $图片.取像素颜色(图片ID, 0, 0)
282
282
  * $打印信息日志($图片.颜色转16进制字符串(颜色值))
@@ -290,7 +290,7 @@ declare namespace $图片 {
290
290
  * @param 阈值
291
291
  * @returns 二值化后的图片ID
292
292
  * @example
293
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
293
+ * const 图片ID = $图片.读取图片("screen.jpg")
294
294
  * if (图片ID) {
295
295
  * const 二值化图片ID = $图片.二值化图片(图片ID, 128)
296
296
  * if (二值化图片ID) {
@@ -305,7 +305,7 @@ declare namespace $图片 {
305
305
  * @param 图片ID
306
306
  * @returns 灰度化后的图片ID
307
307
  * @example
308
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
308
+ * const 图片ID = $图片.读取图片("screen.jpg")
309
309
  * if (图片ID) {
310
310
  * const 灰度化图片ID = $图片.灰度化图片(图片ID)
311
311
  * if (灰度化图片ID) {
@@ -334,7 +334,7 @@ declare namespace $图片 {
334
334
  * @param 质量 质量 1-100 数字越大质量越高
335
335
  * @returns base64字符串
336
336
  * @example
337
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
337
+ * const 图片ID = $图片.读取图片("screen.jpg")
338
338
  * if (图片ID) {
339
339
  * const base64 = $图片.图片转base64(图片ID, "jpg", 100)
340
340
  * $打印信息日志(base64)
@@ -347,7 +347,7 @@ declare namespace $图片 {
347
347
  * @param 图片ID 图片ID
348
348
  * @returns 条码内容
349
349
  * @example
350
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
350
+ * const 图片ID = $图片.读取图片("screen.jpg")
351
351
  * if (图片ID) {
352
352
  * const 条码内容 = $图片.扫描条码(图片ID)
353
353
  * if (条码内容) {
@@ -368,7 +368,7 @@ declare namespace $图片 {
368
368
  * @param 线宽 线宽
369
369
  * @returns 无返回值
370
370
  * @example
371
- * const 图片ID = $图片.从文件读取图片("screen.jpg")
371
+ * const 图片ID = $图片.读取图片("screen.jpg")
372
372
  * if (图片ID) {
373
373
  * $图片.绘制矩形(图片ID, 0, 0, 100, 100, "#ff0000", 1)
374
374
  * }
@@ -50,5 +50,5 @@ declare namespace $悬浮窗 {
50
50
  * 设置是否允许悬浮窗控制脚本启停
51
51
  * @param 是否允许 true代表允许,false代表不允许
52
52
  */
53
- function 设置日志窗口是否允许脚本控制(是否允许: 布尔值): 无返回值;
53
+ function 设置是否允许控制脚本启停(是否允许: 布尔值): 无返回值;
54
54
  }
@@ -86,7 +86,7 @@ declare namespace $文字转语音 {
86
86
  /**
87
87
  * 释放TTS资源(调用时,会停止当前播放并释放资源)
88
88
  * @example
89
- * $文字转语音.释放TTS资源();
89
+ * $文字转语音.释放资源();
90
90
  */
91
- function 释放TTS资源(): 无返回值;
91
+ function 释放资源(): 无返回值;
92
92
  }
@@ -69,7 +69,7 @@ declare namespace $系统 {
69
69
  * $打印信息日志("锁屏")
70
70
  * }
71
71
  */
72
- function 是否锁屏(): boolean;
72
+ function 是否锁屏(): 布尔值;
73
73
  /**
74
74
  * 锁屏
75
75
  * @returns 是否锁屏成功
@@ -79,7 +79,7 @@ declare namespace $系统 {
79
79
  * $打印信息日志("锁屏成功")
80
80
  * }
81
81
  */
82
- function 锁屏(): boolean;
82
+ function 锁屏(): 布尔值;
83
83
  /**
84
84
  * 解锁 如果有密码 会停在解锁界面
85
85
  * @returns 是否解锁成功
@@ -89,7 +89,7 @@ declare namespace $系统 {
89
89
  * $打印信息日志("解锁成功")
90
90
  * }
91
91
  */
92
- function 解锁(): boolean;
92
+ function 解锁(): 布尔值;
93
93
  /**
94
94
  * 设置剪贴板 APP 在前台运行时才能设置
95
95
  * @param text 剪贴板内容
@@ -151,7 +151,7 @@ declare namespace $系统 {
151
151
  * const 已使用内存 = $系统.获取已使用内存()
152
152
  * $打印信息日志(`已使用内存: ${已使用内存}MB`)
153
153
  */
154
- function 获取已使用内存(): number;
154
+ function 获取已使用内存(): 数字;
155
155
  /**
156
156
  * 获取可用内存
157
157
  * @returns 可用内存大小(单位:MB)
@@ -159,7 +159,7 @@ declare namespace $系统 {
159
159
  * const 可用内存 = $系统.获取可用内存()
160
160
  * $打印信息日志(`可用内存: ${可用内存}MB`)
161
161
  */
162
- function 获取可用内存(): number;
162
+ function 获取可用内存(): 数字;
163
163
  /**
164
164
  * 获取系统总内存
165
165
  * @returns 系统总内存大小(单位:MB)
@@ -167,7 +167,7 @@ declare namespace $系统 {
167
167
  * const 总内存 = $系统.获取系统总内存()
168
168
  * $打印信息日志(`系统总内存: ${总内存}MB`)
169
169
  */
170
- function 获取系统总内存(): number;
170
+ function 获取系统总内存(): 数字;
171
171
  /**
172
172
  * 启动 WDA 服务
173
173
  * @returns 是否启动成功
@@ -177,7 +177,7 @@ declare namespace $系统 {
177
177
  * $打印信息日志("WDA 启动成功")
178
178
  * }
179
179
  */
180
- function 启动WDA服务(): boolean;
180
+ function 启动WDA服务(): 布尔值;
181
181
  /**
182
182
  * 获取 WDA 状态
183
183
  * @returns WDA 是否正在运行
@@ -189,5 +189,5 @@ declare namespace $系统 {
189
189
  * $打印信息日志("WDA 服务未运行")
190
190
  * }
191
191
  */
192
- function 获取WDA状态(): boolean;
192
+ function 获取WDA状态(): 布尔值;
193
193
  }
@@ -89,14 +89,14 @@ declare namespace $线程 {
89
89
  * $打印信息日志(数据)
90
90
  * return "1111"
91
91
  * })
92
- * $线程.线程是否已被取消(新线程.name)
92
+ * $线程.是否已被取消(新线程.name)
93
93
  */
94
- function 线程是否已被取消(线程名称: 字符串): 布尔值;
94
+ function 是否已被取消(线程名称: 字符串): 布尔值;
95
95
  /**
96
- * 停止所有线程
96
+ * 停止所有
97
97
  * @returns 是否停止成功
98
98
  * @example
99
- * $线程.停止所有线程()
99
+ * $线程.停止所有()
100
100
  */
101
- function 停止所有线程(): 布尔值;
101
+ function 停止所有(): 布尔值;
102
102
  }
@@ -104,7 +104,7 @@ declare namespace $视图 {
104
104
  * })
105
105
  */
106
106
  function 监听事件回调(
107
- 回调函数: (事件名称: string, 数据: 字典<任意类型>) => 无返回值
107
+ 回调函数: (事件名称: 字符串, 数据: 字典<任意类型>) => 无返回值
108
108
  ): 无返回值;
109
109
 
110
110
  /**
@@ -63,7 +63,7 @@ declare namespace $输入法 {
63
63
  function 按回车键(): 布尔值;
64
64
  /**
65
65
  * 隐藏键盘
66
- * @returns {boolean} 如果成功返回 true,否则返回 false
66
+ * @returns 如果成功返回 true,否则返回 false
67
67
  * @example
68
68
  * if ($输入法.隐藏键盘()) {
69
69
  * $打印信息日志("键盘已隐藏")