@types/chrome 0.0.201 → 0.0.203

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 +32 -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 01:32:48 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.
@@ -10936,6 +10956,18 @@ declare namespace chrome.webRequest {
10936
10956
  export interface WebRequestHeadersDetails extends WebRequestDetails {
10937
10957
  /** Optional. The HTTP request headers that are going to be sent out with this request. */
10938
10958
  requestHeaders?: HttpHeader[] | undefined;
10959
+ documentId: string;
10960
+ documentLifecycle: "prerender" | "active" | "cached" | "pending_deletion";
10961
+ frameType: "outermost_frame" | "fenced_frame" | "sub_frame";
10962
+ frameId: number;
10963
+ initiator?: string | undefined;
10964
+ parentDocumentId?: string | undefined;
10965
+ parentFrameId: number;
10966
+ requestId: string;
10967
+ tabId: number;
10968
+ timeStamp: number;
10969
+ type: ResourceType;
10970
+ url: string;
10939
10971
  }
10940
10972
 
10941
10973
  export interface WebRequestBodyDetails extends WebRequestDetails {
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.201",
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": "1e4ecbccede98da507da64943a7ad79acb14be1670adc35ccf7c4c0952018a6e",
91
+ "typesPublisherContentHash": "69cfd59eea67cc101521b7b9992e2207374479a7f89976b32550e78f08dbf34e",
92
92
  "typeScriptVersion": "4.1"
93
93
  }