@types/chrome 0.0.202 → 0.0.203

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 +20 -0
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Chrome extension development (http://
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 15 Nov 2022 08:02:56 GMT
11
+ * Last updated: Wed, 23 Nov 2022 18:11:34 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
  * Global values: `chrome`
14
14
 
chrome/index.d.ts CHANGED
@@ -143,6 +143,11 @@ declare namespace chrome.action {
143
143
  tabId?: number | undefined;
144
144
  }
145
145
 
146
+ export interface UserSettings {
147
+ /** Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user). */
148
+ isOnToolbar: boolean;
149
+ }
150
+
146
151
  /**
147
152
  * Since Chrome 88.
148
153
  * Disables the action for a tab.
@@ -238,6 +243,21 @@ declare namespace chrome.action {
238
243
  */
239
244
  export function getTitle(details: TabDetails): Promise<string>;
240
245
 
246
+ /**
247
+ * Since Chrome 91.
248
+ * Returns the user-specified settings relating to an extension's action.
249
+ * @param callback The callback parameter should be a function that looks like this:
250
+ * (userSettings: UserSettings) => {...}
251
+ */
252
+ export function getUserSettings(callback: (userSettings: UserSettings) => void): void;
253
+
254
+ /**
255
+ * Since Chrome 91.
256
+ * Returns the user-specified settings relating to an extension's action.
257
+ * @return The `getUserSettings` method provides its result via callback or returned as a `Promise` (MV3 only).
258
+ */
259
+ export function getUserSettings(): Promise<UserSettings>;
260
+
241
261
  /**
242
262
  * Since Chrome 88.
243
263
  * Sets the background color for the badge.
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.202",
3
+ "version": "0.0.203",
4
4
  "description": "TypeScript definitions for Chrome extension development",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -88,6 +88,6 @@
88
88
  "@types/filesystem": "*",
89
89
  "@types/har-format": "*"
90
90
  },
91
- "typesPublisherContentHash": "e403997e87224dfa64bcccd56cf255ff2b75fba52d3ebc1be1bf1e0c16889b8c",
91
+ "typesPublisherContentHash": "69cfd59eea67cc101521b7b9992e2207374479a7f89976b32550e78f08dbf34e",
92
92
  "typeScriptVersion": "4.1"
93
93
  }