@dompling/trollscript-types 1.0.37 → 1.0.44

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.
Files changed (2) hide show
  1. package/index.d.ts +24 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -796,6 +796,25 @@ interface Display {
796
796
  */
797
797
  openSettings(): boolean;
798
798
 
799
+ /**
800
+ * 获取自动锁定时间
801
+ * @returns 自动锁定时间(秒),0 表示永不
802
+ */
803
+ getAutoLockTime(): number;
804
+
805
+ /**
806
+ * 设置自动锁定时间
807
+ * @param seconds 锁定时间(秒),0 表示永不
808
+ * @returns 是否设置成功
809
+ */
810
+ setAutoLock(seconds: number): boolean;
811
+
812
+ /**
813
+ * 保持屏幕常亮
814
+ * @param enabled 是否保持常亮
815
+ */
816
+ keepAwake(enabled: boolean): void;
817
+
799
818
  }
800
819
 
801
820
  declare const display: Display;
@@ -1209,6 +1228,11 @@ interface Notification {
1209
1228
  */
1210
1229
  getBadge(): any;
1211
1230
 
1231
+ /**
1232
+ * 清除角标
1233
+ */
1234
+ clearBadge(): void;
1235
+
1212
1236
  /**
1213
1237
  * 定时通知
1214
1238
  * @param title 通知标题
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dompling/trollscript-types",
3
- "version": "1.0.37",
3
+ "version": "1.0.44",
4
4
  "description": "TypeScript definitions for TrollScript",
5
5
  "main": "",
6
6
  "types": "index.d.ts",