@types/chrome 0.1.20 → 0.1.21

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 +28 -12
  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: Fri, 03 Oct 2025 06:02:16 GMT
11
+ * Last updated: Fri, 03 Oct 2025 06:39:45 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
@@ -6900,22 +6900,38 @@ declare namespace chrome {
6900
6900
  * @since Chrome 78
6901
6901
  */
6902
6902
  export namespace loginState {
6903
- export interface SessionStateChangedEvent extends chrome.events.Event<(sessionState: SessionState) => void> {}
6904
-
6905
- /** Possible profile types. */
6906
- export type ProfileType = "SIGNIN_PROFILE" | "USER_PROFILE";
6903
+ export enum ProfileType {
6904
+ SIGNIN_PROFILE = "SIGNIN_PROFILE",
6905
+ USER_PROFILE = "USER_PROFILE",
6906
+ }
6907
6907
 
6908
- /** Possible session states. */
6909
- export type SessionState = "UNKNOWN" | "IN_OOBE_SCREEN" | "IN_LOGIN_SCREEN" | "IN_SESSION" | "IN_LOCK_SCREEN";
6908
+ export enum SessionState {
6909
+ UNKNOWN = "UNKNOWN",
6910
+ IN_OOBE_SCREEN = "IN_OOBE_SCREEN",
6911
+ IN_LOGIN_SCREEN = "IN_LOGIN_SCREEN",
6912
+ IN_SESSION = "IN_SESSION",
6913
+ IN_LOCK_SCREEN = "IN_LOCK_SCREEN",
6914
+ IN_RMA_SCREEN = "IN_RMA_SCREEN",
6915
+ }
6910
6916
 
6911
- /** Gets the type of the profile the extension is in. */
6912
- export function getProfileType(callback: (profileType: ProfileType) => void): void;
6917
+ /**
6918
+ * Gets the type of the profile the extension is in.
6919
+ *
6920
+ * Can return its result via Promise in Manifest V3 or later since Chrome 96.
6921
+ */
6922
+ export function getProfileType(): Promise<`${ProfileType}`>;
6923
+ export function getProfileType(callback: (result: `${ProfileType}`) => void): void;
6913
6924
 
6914
- /** Gets the current session state. */
6915
- export function getSessionState(callback: (sessionState: SessionState) => void): void;
6925
+ /**
6926
+ * Gets the current session state.
6927
+ *
6928
+ * Can return its result via Promise in Manifest V3 or later since Chrome 96.
6929
+ */
6930
+ export function getSessionState(): Promise<`${SessionState}`>;
6931
+ export function getSessionState(callback: (sessionState: `${SessionState}`) => void): void;
6916
6932
 
6917
- /** Dispatched when the session state changes. sessionState is the new session state.*/
6918
- export const onSessionStateChanged: SessionStateChangedEvent;
6933
+ /** Dispatched when the session state changes. `sessionState` is the new session state.*/
6934
+ export const onSessionStateChanged: events.Event<(sessionState: `${SessionState}`) => void>;
6919
6935
  }
6920
6936
 
6921
6937
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
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": "433cd27fa4711e2223cc598ccb6f0921c2fdadb29d28cee16f78c1f291cce217",
97
+ "typesPublisherContentHash": "428112a1fe1e6c91a0d80daf37710dfb8d33374f33d46c605328323a5676a6dd",
98
98
  "typeScriptVersion": "5.2"
99
99
  }