ms-types 0.0.68 → 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 +1 -1
- package/types/http.d.ts +19 -19
- package/types/image.d.ts +2 -3
- package/types/zh/HTTP/346/250/241/345/235/227.d.ts +19 -19
- package/types/zh/MySQL/346/250/241/345/235/227.d.ts +2 -2
- package/types/zh/YOLO/346/250/241/345/235/227.d.ts +1 -1
- package/types/zh//345/205/250/345/261/200/346/250/241/345/235/227.d.ts +9 -10
- package/types/zh//345/233/276/347/211/207/346/250/241/345/235/227.d.ts +16 -17
- package/types/zh//346/202/254/346/265/256/347/252/227/346/250/241/345/235/227.d.ts +1 -1
- package/types/zh//346/226/207/344/273/266/346/250/241/345/235/227.d.ts +1 -1
- package/types/zh//346/226/207/345/255/227/350/275/254/350/257/255/351/237/263/346/250/241/345/235/227.d.ts +2 -2
- package/types/zh//347/263/273/347/273/237/346/250/241/345/235/227.d.ts +8 -8
- package/types/zh//347/272/277/347/250/213/346/250/241/345/235/227.d.ts +5 -5
- package/types/zh//350/247/206/345/233/276/346/250/241/345/235/227.d.ts +1 -1
- package/types/zh//350/256/276/345/244/207/346/250/241/345/235/227.d.ts +6 -6
- package/types/zh//350/276/223/345/205/245/346/263/225/346/250/241/345/235/227.d.ts +1 -1
package/package.json
CHANGED
package/types/http.d.ts
CHANGED
|
@@ -190,6 +190,25 @@ declare namespace http {
|
|
|
190
190
|
headers?: Record<string, string>
|
|
191
191
|
): string;
|
|
192
192
|
|
|
193
|
+
/**
|
|
194
|
+
* 创建WebSocket连接
|
|
195
|
+
* @param url 连接地址
|
|
196
|
+
* @param header 连接头
|
|
197
|
+
* @returns WebSocket连接对象
|
|
198
|
+
* @example
|
|
199
|
+
* const ws = http.newWebsocket("ws://www.baidu.com")
|
|
200
|
+
* ws.connect()
|
|
201
|
+
* ws.onText((data) => {
|
|
202
|
+
* logi(data)
|
|
203
|
+
* })
|
|
204
|
+
* ws.sendText("hello")
|
|
205
|
+
* ws.close()
|
|
206
|
+
*/
|
|
207
|
+
function newWebsocket(
|
|
208
|
+
url: string,
|
|
209
|
+
header?: Record<string, string>
|
|
210
|
+
): WebSocket;
|
|
211
|
+
|
|
193
212
|
/**
|
|
194
213
|
* WebSocket连接
|
|
195
214
|
*/
|
|
@@ -278,23 +297,4 @@ declare namespace http {
|
|
|
278
297
|
*/
|
|
279
298
|
setAutoReconnect(autoReconnect: boolean): void;
|
|
280
299
|
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* 创建WebSocket连接
|
|
284
|
-
* @param url 连接地址
|
|
285
|
-
* @param header 连接头
|
|
286
|
-
* @returns WebSocket连接对象
|
|
287
|
-
* @example
|
|
288
|
-
* const ws = http.newWebsocket("ws://www.baidu.com")
|
|
289
|
-
* ws.connect()
|
|
290
|
-
* ws.onText((data) => {
|
|
291
|
-
* logi(data)
|
|
292
|
-
* })
|
|
293
|
-
* ws.sendText("hello")
|
|
294
|
-
* ws.close()
|
|
295
|
-
*/
|
|
296
|
-
function newWebsocket(
|
|
297
|
-
url: string,
|
|
298
|
-
header?: Record<string, string>
|
|
299
|
-
): WebSocket;
|
|
300
300
|
}
|
package/types/image.d.ts
CHANGED
|
@@ -271,18 +271,17 @@ declare namespace image {
|
|
|
271
271
|
function pixel(imageId: string, x: number, y: number): number;
|
|
272
272
|
/**
|
|
273
273
|
* 将整型的颜色值转成16进制RGB字符串
|
|
274
|
-
* @param imageId 图片id
|
|
275
274
|
* @param color 颜色值
|
|
276
275
|
* @returns 16进制RGB字符串
|
|
277
276
|
* @example
|
|
278
277
|
* const imageId = image.readImage("screen.jpg")
|
|
279
278
|
* if (imageId) {
|
|
280
279
|
* const color = image.pixel(imageId, 0, 0)
|
|
281
|
-
* logi(image.argb(
|
|
280
|
+
* logi(image.argb(color))
|
|
282
281
|
* }
|
|
283
282
|
* image.release(imageId)
|
|
284
283
|
*/
|
|
285
|
-
function argb(
|
|
284
|
+
function argb(color: number): string;
|
|
286
285
|
/**
|
|
287
286
|
* 二值化
|
|
288
287
|
* @param imageId 图片id
|
|
@@ -191,6 +191,25 @@ declare namespace $HTTP {
|
|
|
191
191
|
请求头?: 字典<字符串>
|
|
192
192
|
): 字符串;
|
|
193
193
|
|
|
194
|
+
/**
|
|
195
|
+
* 创建WebSocket连接
|
|
196
|
+
* @param 连接地址
|
|
197
|
+
* @param 连接头
|
|
198
|
+
* @returns WebSocket连接对象
|
|
199
|
+
* @example
|
|
200
|
+
* const ws连接 = $HTTP.创建WebSocket连接("ws://www.baidu.com")
|
|
201
|
+
* ws连接.连接()
|
|
202
|
+
* ws连接.监听文本消息回调((data) => {
|
|
203
|
+
* $打印信息日志(data)
|
|
204
|
+
* })
|
|
205
|
+
* ws连接.发送文本("hello")
|
|
206
|
+
* ws连接.关闭()
|
|
207
|
+
*/
|
|
208
|
+
function 创建WebSocket连接(
|
|
209
|
+
连接地址: 字符串,
|
|
210
|
+
连接头?: 字典<字符串>
|
|
211
|
+
): WebSocket连接;
|
|
212
|
+
|
|
194
213
|
/**
|
|
195
214
|
* WebSocket连接
|
|
196
215
|
*/
|
|
@@ -279,23 +298,4 @@ declare namespace $HTTP {
|
|
|
279
298
|
*/
|
|
280
299
|
设置自动重连(是否自动重连: 布尔值): 无返回值;
|
|
281
300
|
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* 创建WebSocket连接
|
|
285
|
-
* @param 连接地址
|
|
286
|
-
* @param 连接头
|
|
287
|
-
* @returns WebSocket连接对象
|
|
288
|
-
* @example
|
|
289
|
-
* const ws连接 = $HTTP.创建WebSocket连接("ws://www.baidu.com")
|
|
290
|
-
* ws连接.连接()
|
|
291
|
-
* ws连接.监听文本消息回调((data) => {
|
|
292
|
-
* $打印信息日志(data)
|
|
293
|
-
* })
|
|
294
|
-
* ws连接.发送文本("hello")
|
|
295
|
-
* ws连接.关闭()
|
|
296
|
-
*/
|
|
297
|
-
function 创建WebSocket连接(
|
|
298
|
-
连接地址: 字符串,
|
|
299
|
-
连接头?: 字典<字符串>
|
|
300
|
-
): WebSocket连接;
|
|
301
301
|
}
|
|
@@ -55,14 +55,14 @@ declare namespace $MySQL数据库 {
|
|
|
55
55
|
* $打印信息日志("数据库连接成功")
|
|
56
56
|
* }
|
|
57
57
|
*/
|
|
58
|
-
function 连接(
|
|
58
|
+
function 连接(连接配置: MySQL连接配置): 布尔值;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* 断开数据库连接
|
|
62
62
|
* @example
|
|
63
63
|
* $MySQL数据库.断开连接()
|
|
64
64
|
*/
|
|
65
|
-
function 断开连接():
|
|
65
|
+
function 断开连接(): 无返回值;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* 检查连接状态
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
declare type 回调 = Function;
|
|
2
1
|
declare type 布尔值 = boolean;
|
|
3
2
|
declare type 字符串 = string;
|
|
4
3
|
declare type 数字 = number;
|
|
@@ -20,31 +19,31 @@ declare const $假: 布尔值;
|
|
|
20
19
|
/**
|
|
21
20
|
* 是否是调试模式
|
|
22
21
|
*/
|
|
23
|
-
declare const $是否调试:
|
|
22
|
+
declare const $是否调试: 布尔值;
|
|
24
23
|
/**
|
|
25
24
|
* 是否应该退出应用
|
|
26
25
|
*/
|
|
27
|
-
declare const $是否退出:
|
|
26
|
+
declare const $是否退出: 布尔值;
|
|
28
27
|
/**
|
|
29
28
|
* 应用版本
|
|
30
29
|
*/
|
|
31
|
-
declare const $APP应用版本:
|
|
30
|
+
declare const $APP应用版本: 字符串;
|
|
32
31
|
/**
|
|
33
32
|
* 应用构建号
|
|
34
33
|
*/
|
|
35
|
-
declare const $APP应用构建号:
|
|
34
|
+
declare const $APP应用构建号: 字符串;
|
|
36
35
|
/**
|
|
37
36
|
* 应用名称
|
|
38
37
|
*/
|
|
39
|
-
declare const $APP应用名称:
|
|
38
|
+
declare const $APP应用名称: 字符串;
|
|
40
39
|
/**
|
|
41
40
|
* 应用 bundleId
|
|
42
41
|
*/
|
|
43
|
-
declare const $APP应用包名:
|
|
42
|
+
declare const $APP应用包名: 字符串;
|
|
44
43
|
/**
|
|
45
44
|
* 当前线程名称
|
|
46
45
|
*/
|
|
47
|
-
declare const $线程名称:
|
|
46
|
+
declare const $线程名称: 字符串;
|
|
48
47
|
/**
|
|
49
48
|
* 脚本信息
|
|
50
49
|
*/
|
|
@@ -68,7 +67,7 @@ declare const $脚本配置: {
|
|
|
68
67
|
* $打印信息日志("脚本执行完成");
|
|
69
68
|
* });
|
|
70
69
|
*/
|
|
71
|
-
declare const $设置停止回调: (回调:
|
|
70
|
+
declare const $设置停止回调: (回调: () => 无返回值) => 无返回值;
|
|
72
71
|
|
|
73
72
|
/**
|
|
74
73
|
* 设置异常停止回调(仅主线程调用)
|
|
@@ -79,7 +78,7 @@ declare const $设置停止回调: (回调: 回调) => 无返回值;
|
|
|
79
78
|
* $打印错误日志("脚本执行异常");
|
|
80
79
|
* });
|
|
81
80
|
*/
|
|
82
|
-
declare const $设置异常停止回调: (回调:
|
|
81
|
+
declare const $设置异常停止回调: (回调: () => 无返回值) => 无返回值;
|
|
83
82
|
|
|
84
83
|
/**
|
|
85
84
|
* 重启脚本(仅主线程调用)
|
|
@@ -64,13 +64,13 @@ declare namespace $图片 {
|
|
|
64
64
|
* @param path 图片路径
|
|
65
65
|
* @returns 图片id ,如果读取失败则返回null
|
|
66
66
|
* @example
|
|
67
|
-
* const 图片ID =
|
|
67
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
68
68
|
* if (图片ID) {
|
|
69
69
|
* $图片.保存图片(图片ID, "screen.jpg")
|
|
70
70
|
* }
|
|
71
71
|
* $图片.释放图片(图片ID)
|
|
72
72
|
*/
|
|
73
|
-
function
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
266
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
267
267
|
* if (图片ID) {
|
|
268
268
|
* const 颜色值 = $图片.取像素颜色(图片ID, 0, 0)
|
|
269
269
|
* $打印信息日志(颜色值)
|
|
@@ -273,25 +273,24 @@ declare namespace $图片 {
|
|
|
273
273
|
function 取像素颜色(图片ID: 字符串, 坐标x: 数字, 坐标y: 数字): 数字;
|
|
274
274
|
/**
|
|
275
275
|
* 将整型的颜色值转成16进制RGB字符串
|
|
276
|
-
* @param 图片ID
|
|
277
276
|
* @param 颜色值
|
|
278
277
|
* @returns 16进制RGB字符串
|
|
279
278
|
* @example
|
|
280
|
-
* const 图片ID =
|
|
279
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
281
280
|
* if (图片ID) {
|
|
282
281
|
* const 颜色值 = $图片.取像素颜色(图片ID, 0, 0)
|
|
283
|
-
* $打印信息日志($图片.颜色转16进制字符串(
|
|
282
|
+
* $打印信息日志($图片.颜色转16进制字符串(颜色值))
|
|
284
283
|
* }
|
|
285
284
|
* $图片.释放图片(图片ID)
|
|
286
285
|
*/
|
|
287
|
-
function 颜色转16进制字符串(
|
|
286
|
+
function 颜色转16进制字符串(颜色值: 数字): 字符串;
|
|
288
287
|
/**
|
|
289
288
|
* 二值化
|
|
290
289
|
* @param 图片ID
|
|
291
290
|
* @param 阈值
|
|
292
291
|
* @returns 二值化后的图片ID
|
|
293
292
|
* @example
|
|
294
|
-
* const 图片ID =
|
|
293
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
295
294
|
* if (图片ID) {
|
|
296
295
|
* const 二值化图片ID = $图片.二值化图片(图片ID, 128)
|
|
297
296
|
* if (二值化图片ID) {
|
|
@@ -306,7 +305,7 @@ declare namespace $图片 {
|
|
|
306
305
|
* @param 图片ID
|
|
307
306
|
* @returns 灰度化后的图片ID
|
|
308
307
|
* @example
|
|
309
|
-
* const 图片ID =
|
|
308
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
310
309
|
* if (图片ID) {
|
|
311
310
|
* const 灰度化图片ID = $图片.灰度化图片(图片ID)
|
|
312
311
|
* if (灰度化图片ID) {
|
|
@@ -335,7 +334,7 @@ declare namespace $图片 {
|
|
|
335
334
|
* @param 质量 质量 1-100 数字越大质量越高
|
|
336
335
|
* @returns base64字符串
|
|
337
336
|
* @example
|
|
338
|
-
* const 图片ID =
|
|
337
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
339
338
|
* if (图片ID) {
|
|
340
339
|
* const base64 = $图片.图片转base64(图片ID, "jpg", 100)
|
|
341
340
|
* $打印信息日志(base64)
|
|
@@ -348,7 +347,7 @@ declare namespace $图片 {
|
|
|
348
347
|
* @param 图片ID 图片ID
|
|
349
348
|
* @returns 条码内容
|
|
350
349
|
* @example
|
|
351
|
-
* const 图片ID =
|
|
350
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
352
351
|
* if (图片ID) {
|
|
353
352
|
* const 条码内容 = $图片.扫描条码(图片ID)
|
|
354
353
|
* if (条码内容) {
|
|
@@ -369,7 +368,7 @@ declare namespace $图片 {
|
|
|
369
368
|
* @param 线宽 线宽
|
|
370
369
|
* @returns 无返回值
|
|
371
370
|
* @example
|
|
372
|
-
* const 图片ID =
|
|
371
|
+
* const 图片ID = $图片.读取图片("screen.jpg")
|
|
373
372
|
* if (图片ID) {
|
|
374
373
|
* $图片.绘制矩形(图片ID, 0, 0, 100, 100, "#ff0000", 1)
|
|
375
374
|
* }
|
|
@@ -69,7 +69,7 @@ declare namespace $系统 {
|
|
|
69
69
|
* $打印信息日志("锁屏")
|
|
70
70
|
* }
|
|
71
71
|
*/
|
|
72
|
-
function 是否锁屏():
|
|
72
|
+
function 是否锁屏(): 布尔值;
|
|
73
73
|
/**
|
|
74
74
|
* 锁屏
|
|
75
75
|
* @returns 是否锁屏成功
|
|
@@ -79,7 +79,7 @@ declare namespace $系统 {
|
|
|
79
79
|
* $打印信息日志("锁屏成功")
|
|
80
80
|
* }
|
|
81
81
|
*/
|
|
82
|
-
function 锁屏():
|
|
82
|
+
function 锁屏(): 布尔值;
|
|
83
83
|
/**
|
|
84
84
|
* 解锁 如果有密码 会停在解锁界面
|
|
85
85
|
* @returns 是否解锁成功
|
|
@@ -89,7 +89,7 @@ declare namespace $系统 {
|
|
|
89
89
|
* $打印信息日志("解锁成功")
|
|
90
90
|
* }
|
|
91
91
|
*/
|
|
92
|
-
function 解锁():
|
|
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 获取已使用内存():
|
|
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 获取可用内存():
|
|
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 获取系统总内存():
|
|
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服务():
|
|
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状态():
|
|
192
|
+
function 获取WDA状态(): 布尔值;
|
|
193
193
|
}
|
|
@@ -89,14 +89,14 @@ declare namespace $线程 {
|
|
|
89
89
|
* $打印信息日志(数据)
|
|
90
90
|
* return "1111"
|
|
91
91
|
* })
|
|
92
|
-
*
|
|
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
|
}
|
|
@@ -12,11 +12,11 @@ declare namespace $设备 {
|
|
|
12
12
|
/**
|
|
13
13
|
* 电池电量
|
|
14
14
|
*/
|
|
15
|
-
level:
|
|
15
|
+
level: 数字;
|
|
16
16
|
/**
|
|
17
17
|
* 是否充电
|
|
18
18
|
*/
|
|
19
|
-
isCharging:
|
|
19
|
+
isCharging: 布尔值;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* 获取设备ID
|
|
@@ -51,11 +51,11 @@ declare namespace $设备 {
|
|
|
51
51
|
/**
|
|
52
52
|
* 屏幕宽度
|
|
53
53
|
*/
|
|
54
|
-
width:
|
|
54
|
+
width: 数字;
|
|
55
55
|
/**
|
|
56
56
|
* 屏幕高度
|
|
57
57
|
*/
|
|
58
|
-
height:
|
|
58
|
+
height: 数字;
|
|
59
59
|
};
|
|
60
60
|
/**
|
|
61
61
|
* 获取屏幕实际大小
|
|
@@ -66,11 +66,11 @@ declare namespace $设备 {
|
|
|
66
66
|
/**
|
|
67
67
|
* 屏幕宽度
|
|
68
68
|
*/
|
|
69
|
-
width:
|
|
69
|
+
width: 数字;
|
|
70
70
|
/**
|
|
71
71
|
* 屏幕高度
|
|
72
72
|
*/
|
|
73
|
-
height:
|
|
73
|
+
height: 数字;
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
76
76
|
* 获取屏幕缩放比例
|