@types/chrome 0.0.202 → 0.0.204

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 +22 -0
  3. chrome/package.json +3 -3
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: Sun, 11 Dec 2022 03:03:04 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.
@@ -7603,6 +7623,8 @@ declare namespace chrome.scripting {
7603
7623
  target: InjectionTarget;
7604
7624
  /* The JavaScript world for a script to execute within. */
7605
7625
  world?: ExecutionWorld;
7626
+ /* Whether the injection should be triggered in the target as soon as possible. Note that this is not a guarantee that injection will occur prior to page load, as the page may have already loaded by the time the script reaches the target. */
7627
+ injectImmediately?: boolean;
7606
7628
  } & ({
7607
7629
  /* The path of the JS files to inject, relative to the extension's root directory. NOTE: Currently a maximum of one file is supported. Exactly one of files and function must be specified. */
7608
7630
  files: string[];
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.202",
3
+ "version": "0.0.204",
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",
92
- "typeScriptVersion": "4.1"
91
+ "typesPublisherContentHash": "dbe7bcf6805e3975a3cc4ff0f3548120febb3c6ea59b2376a1194128474a6307",
92
+ "typeScriptVersion": "4.2"
93
93
  }