@types/chrome 0.1.5 → 0.1.7

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 (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +23 -22
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 03 Sep 2025 07:03:15 GMT
11
+ * Last updated: Mon, 08 Sep 2025 16:37:53 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
@@ -2817,14 +2817,10 @@ declare namespace chrome {
2817
2817
  * @since Chrome 129
2818
2818
  */
2819
2819
  export namespace devtools.performance {
2820
- export interface ProfilingStartedEvent extends chrome.events.Event<() => void> {}
2821
-
2822
- export interface ProfilingStoppedEvent extends chrome.events.Event<() => void> {}
2823
-
2824
- /** Fired when the Performance panel begins recording performance data. */
2825
- export var onProfilingStarted: ProfilingStartedEvent;
2826
- /** Fired when the Performance panel stops recording performance data. */
2827
- export var onProfilingStopped: ProfilingStoppedEvent;
2820
+ /** Fired when the Performance panel starts recording. */
2821
+ export const onProfilingStarted: events.Event<() => void>;
2822
+ /** Fired when the Performance panel stops recording. */
2823
+ export const onProfilingStopped: events.Event<() => void>;
2828
2824
  }
2829
2825
 
2830
2826
  ////////////////////
@@ -6121,38 +6117,43 @@ declare namespace chrome {
6121
6117
  * Permissions: "idle"
6122
6118
  */
6123
6119
  export namespace idle {
6124
- export type IdleState = "active" | "idle" | "locked";
6125
- export interface IdleStateChangedEvent extends chrome.events.Event<(newState: IdleState) => void> {}
6120
+ /** @since Chrome 44 */
6121
+ export enum IdleState {
6122
+ ACTIVE = "active",
6123
+ IDLE = "idle",
6124
+ LOCKED = "locked",
6125
+ }
6126
6126
 
6127
6127
  /**
6128
6128
  * 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.
6129
6129
  * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
6130
- * @since Chrome 116
6131
- */
6132
- export function queryState(detectionIntervalInSeconds: number): Promise<IdleState>;
6133
- /**
6134
- * 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.
6135
- * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
6136
- * @since Chrome 25
6130
+ *
6131
+ * Can return its result via Promise in Manifest V3 or later since Chrome 116.
6137
6132
  */
6138
- export function queryState(detectionIntervalInSeconds: number, callback: (newState: IdleState) => void): void;
6133
+ export function queryState(detectionIntervalInSeconds: number): Promise<`${IdleState}`>;
6134
+ export function queryState(
6135
+ detectionIntervalInSeconds: number,
6136
+ callback: (newState: `${IdleState}`) => void,
6137
+ ): void;
6139
6138
 
6140
6139
  /**
6141
6140
  * 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.
6142
- * @since Chrome 25
6143
6141
  * @param intervalInSeconds Threshold, in seconds, used to determine when the system is in an idle state.
6144
6142
  */
6145
6143
  export function setDetectionInterval(intervalInSeconds: number): void;
6146
6144
 
6147
6145
  /**
6148
- * 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.
6149
- * Parameter delay: Time, in seconds, until the screen is locked automatically while idle. This is zero if the screen never locks automatically.
6146
+ * 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.
6147
+ *
6148
+ * Can return its result via Promise in Manifest V3 or later since Chrome 116.
6149
+ * @since Chrome 73
6150
+ * @platform ChromeOS only
6150
6151
  */
6151
6152
  export function getAutoLockDelay(): Promise<number>;
6152
6153
  export function getAutoLockDelay(callback: (delay: number) => void): void;
6153
6154
 
6154
6155
  /** 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. */
6155
- export var onStateChanged: IdleStateChangedEvent;
6156
+ export const onStateChanged: events.Event<(newState: `${IdleState}`) => void>;
6156
6157
  }
6157
6158
 
6158
6159
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -94,6 +94,6 @@
94
94
  "@types/har-format": "*"
95
95
  },
96
96
  "peerDependencies": {},
97
- "typesPublisherContentHash": "e1fac3378e3f586d03c2f3829b254da0467a69917acf1c6921ddc3c4a76a1ebc",
97
+ "typesPublisherContentHash": "b5537887aa39e34c2ca42e2ec6ebfdbbd43cd16e40272c028c6ed219c1a98d4c",
98
98
  "typeScriptVersion": "5.2"
99
99
  }