ms-types 0.8.3 → 0.8.4

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.8.3",
3
+ "version": "0.8.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/device.d.ts CHANGED
@@ -108,6 +108,12 @@ declare namespace device {
108
108
  * @example device.getScreenScale()
109
109
  */
110
110
  function getScreenScale(): number;
111
+ /**
112
+ * 获取屏幕亮度
113
+ * @returns 屏幕亮度,范围 0.0-1.0
114
+ * @example device.getScreenBrightness()
115
+ */
116
+ function getScreenBrightness(): number;
111
117
  /**
112
118
  * 获取屏幕方向 PORTRAIT 竖屏 LANDSCAPE 横屏
113
119
  * @returns 设备方向
package/types/global.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- /**
2
- * 是否内置内置Agent
3
- */
4
- declare const __isSupportBuiltAgent__: boolean;
5
1
  /**
6
2
  * 运行模式
7
3
  */
package/types/http.d.ts CHANGED
@@ -43,9 +43,9 @@ declare namespace http {
43
43
  */
44
44
  followRedirects?: boolean;
45
45
  /**
46
- * 请求体 仅在POST方法下有效 json 需要进行JSON.stringify
46
+ * 请求体,支持字符串或二进制数据;JSON 对象需要先 JSON.stringify
47
47
  */
48
- requestBody?: string;
48
+ requestBody?: string | ArrayBuffer;
49
49
  /**
50
50
  * 请求头
51
51
  */
@@ -44,9 +44,9 @@ declare namespace $HTTP {
44
44
  */
45
45
  followRedirects?: 布尔值;
46
46
  /**
47
- * 请求体 仅在POST方法下有效 json 需要进行JSON.stringify
47
+ * 请求体,支持字符串或二进制数据;JSON 对象需要先 JSON.stringify
48
48
  */
49
- requestBody?: 字符串;
49
+ requestBody?: 字符串 | ArrayBuffer;
50
50
  /**
51
51
  * 请求头
52
52
  */
@@ -7,10 +7,6 @@ declare type 数组<T> = Array<T>;
7
7
  declare type 字典<T> = Record<字符串, T>;
8
8
  declare type 无返回值 = void;
9
9
 
10
- /**
11
- * 是否内置内置Agent
12
- */
13
- declare const $是否内置Agent: 布尔值;
14
10
  /**
15
11
  * 运行模式
16
12
  */
@@ -109,6 +109,12 @@ declare namespace $设备 {
109
109
  * @example $设备.获取屏幕缩放比例()
110
110
  */
111
111
  function 获取屏幕缩放比例(): 数字;
112
+ /**
113
+ * 获取屏幕亮度
114
+ * @returns 屏幕亮度,范围 0.0-1.0
115
+ * @example $设备.获取屏幕亮度()
116
+ */
117
+ function 获取屏幕亮度(): 数字;
112
118
  /**
113
119
  * 获取屏幕方向 PORTRAIT 竖屏 LANDSCAPE 横屏
114
120
  * @returns 设备方向