@types/chrome 0.0.207 → 0.0.208

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 -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, 10 Jan 2023 05:32:53 GMT
11
+ * Last updated: Wed, 11 Jan 2023 03:02:50 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
@@ -138,6 +138,11 @@ declare namespace chrome.action {
138
138
  imageData?: ImageData | { [index: number]: ImageData } | undefined;
139
139
  }
140
140
 
141
+ export interface OpenPopupOptions {
142
+ /** Optional. The id of the window to open the action popup in. Defaults to the currently-active window if unspecified. */
143
+ windowId?: number | undefined;
144
+ }
145
+
141
146
  export interface TabDetails {
142
147
  /** Optional. The ID of the tab to query state for. If no tab is specified, the non-tab-specific state is returned. */
143
148
  tabId?: number | undefined;
@@ -258,6 +263,24 @@ declare namespace chrome.action {
258
263
  */
259
264
  export function getUserSettings(): Promise<UserSettings>;
260
265
 
266
+ /**
267
+ * Since Chrome 99+.
268
+ * Opens the extension's popup.
269
+ * @param options Specifies options for opening the popup.
270
+ * () => {...}
271
+ * @return The `openPopup` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
272
+ */
273
+ export function openPopup(options?: OpenPopupOptions): Promise<void>;
274
+
275
+ /**
276
+ * Since Chrome 99+.
277
+ * Opens the extension's popup.
278
+ * @param options Specifies options for opening the popup.
279
+ * @param callback The callback parameter should be a function that looks like this:
280
+ * () => {...}
281
+ */
282
+ export function openPopup(options?: OpenPopupOptions, callback?: () => void): void;
283
+
261
284
  /**
262
285
  * Since Chrome 88.
263
286
  * 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.207",
3
+ "version": "0.0.208",
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": "e6b5d60c53c915a0bb80da592d14ee3f9857d00530301f89fa34ae8ea36dcfe9",
91
+ "typesPublisherContentHash": "1dd33572b22a19b6f4a1a3e7bb5f09494130df8bf90a663a340676443c212b3b",
92
92
  "typeScriptVersion": "4.2"
93
93
  }