ms-types 0.5.8 → 0.6.0
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
package/types/device.d.ts
CHANGED
|
@@ -17,6 +17,25 @@ declare namespace device {
|
|
|
17
17
|
*/
|
|
18
18
|
isCharging: boolean;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* 获取存储空间大小(单位:MB)
|
|
22
|
+
* @returns 存储空间状态,包含 total、free、unit
|
|
23
|
+
* @example device.getStorageSpace()
|
|
24
|
+
*/
|
|
25
|
+
function getStorageSpace(): {
|
|
26
|
+
/**
|
|
27
|
+
* 总存储空间
|
|
28
|
+
*/
|
|
29
|
+
total: number;
|
|
30
|
+
/**
|
|
31
|
+
* 可用存储空间
|
|
32
|
+
*/
|
|
33
|
+
free: number;
|
|
34
|
+
/**
|
|
35
|
+
* 单位
|
|
36
|
+
*/
|
|
37
|
+
unit: string;
|
|
38
|
+
};
|
|
20
39
|
/**
|
|
21
40
|
* 获取设备ID
|
|
22
41
|
* @returns 设备ID
|
|
@@ -18,6 +18,25 @@ declare namespace $设备 {
|
|
|
18
18
|
*/
|
|
19
19
|
isCharging: 布尔值;
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* 获取存储空间大小(单位:MB)
|
|
23
|
+
* @returns 存储空间状态,包含 total、free、unit
|
|
24
|
+
* @example $设备.获取存储空间状态()
|
|
25
|
+
*/
|
|
26
|
+
function 获取存储空间状态(): {
|
|
27
|
+
/**
|
|
28
|
+
* 总存储空间
|
|
29
|
+
*/
|
|
30
|
+
total: 数字;
|
|
31
|
+
/**
|
|
32
|
+
* 可用存储空间
|
|
33
|
+
*/
|
|
34
|
+
free: 数字;
|
|
35
|
+
/**
|
|
36
|
+
* 单位
|
|
37
|
+
*/
|
|
38
|
+
unit: 字符串;
|
|
39
|
+
};
|
|
21
40
|
/**
|
|
22
41
|
* 获取设备ID
|
|
23
42
|
* @returns 设备ID
|