@types/chrome 0.0.207 → 0.0.209

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 +26 -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, 18 Jan 2023 18:32: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
  * 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.
@@ -4802,6 +4825,9 @@ declare namespace chrome.identity {
4802
4825
  /** @since Chrome 84. */
4803
4826
  export function getProfileUserInfo(details: ProfileDetails, callback: (userInfo: UserInfo) => void): void;
4804
4827
 
4828
+ /** @since Chrome 84. */
4829
+ export function getProfileUserInfo(details: ProfileDetails): Promise<UserInfo>;
4830
+
4805
4831
  /**
4806
4832
  * Removes an OAuth2 access token from the Identity API's token cache.
4807
4833
  * If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with getAuthToken.
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.207",
3
+ "version": "0.0.209",
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": "3ef20a708ace9b1a58c936bcd247d83b8640c20dfb8a5af221d05db71e9acc50",
92
92
  "typeScriptVersion": "4.2"
93
93
  }