@types/chrome 0.0.263 → 0.0.265

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +9 -0
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 08 Mar 2024 15:35:33 GMT
11
+ * Last updated: Fri, 05 Apr 2024 06:36:08 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
 
14
14
  # Credits
chrome/index.d.ts CHANGED
@@ -4890,22 +4890,31 @@ declare namespace chrome.idle {
4890
4890
  export type IdleState = "active" | "idle" | "locked";
4891
4891
  export interface IdleStateChangedEvent extends chrome.events.Event<(newState: IdleState) => void> {}
4892
4892
 
4893
+ /**
4894
+ * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
4895
+ * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
4896
+ * @since Chrome 116
4897
+ */
4898
+ export function queryState(detectionIntervalInSeconds: number): Promise<IdleState>;
4893
4899
  /**
4894
4900
  * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
4895
4901
  * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
4896
4902
  * @since Chrome 25
4897
4903
  */
4898
4904
  export function queryState(detectionIntervalInSeconds: number, callback: (newState: IdleState) => void): void;
4905
+
4899
4906
  /**
4900
4907
  * Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds.
4901
4908
  * @since Chrome 25
4902
4909
  * @param intervalInSeconds Threshold, in seconds, used to determine when the system is in an idle state.
4903
4910
  */
4904
4911
  export function setDetectionInterval(intervalInSeconds: number): void;
4912
+
4905
4913
  /**
4906
4914
  * Gets the time, in seconds, it takes until the screen is locked automatically while idle. Returns a zero duration if the screen is never locked automatically. Currently supported on Chrome OS only.
4907
4915
  * Parameter delay: Time, in seconds, until the screen is locked automatically while idle. This is zero if the screen never locks automatically.
4908
4916
  */
4917
+ export function getAutoLockDelay(): Promise<number>;
4909
4918
  export function getAutoLockDelay(callback: (delay: number) => void): void;
4910
4919
 
4911
4920
  /** Fired when the system changes to an active, idle or locked state. The event fires with "locked" if the screen is locked or the screensaver activates, "idle" if the system is unlocked and the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system. */
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.263",
3
+ "version": "0.0.265",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -93,6 +93,6 @@
93
93
  "@types/filesystem": "*",
94
94
  "@types/har-format": "*"
95
95
  },
96
- "typesPublisherContentHash": "2f0e12fa0b0ca9a71728502681d45ad2832bbabf2717d826f59e6c1aae1aa42c",
96
+ "typesPublisherContentHash": "89e9b3d4e49f2bc1500ee94f7e6667b57c3b89adbbc01f6e6f4a52cb719b629a",
97
97
  "typeScriptVersion": "4.7"
98
98
  }