@types/chrome 0.0.210 → 0.0.212

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 +30 -10
  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: Mon, 23 Jan 2023 22:02:42 GMT
11
+ * Last updated: Sat, 04 Feb 2023 01:02:41 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
@@ -6013,25 +6013,25 @@ declare namespace chrome.offscreen {
6013
6013
  /** The reason(s) the extension is creating the offscreen document. */
6014
6014
  export enum Reason {
6015
6015
  /** A reason used for testing purposes only. */
6016
- TESTING,
6016
+ TESTING = "TESTING",
6017
6017
  /** The offscreen document is responsible for playing audio. */
6018
- AUDIO_PLAYBACK,
6018
+ AUDIO_PLAYBACK = "AUDIO_PLAYBACK",
6019
6019
  /** The offscreen document needs to embed and script an iframe in order to modify the iframe's content. */
6020
- IFRAME_SCRIPTING,
6020
+ IFRAME_SCRIPTING = "IFRAME_SCRIPTING",
6021
6021
  /** The offscreen document needs to embed an iframe and scrape its DOM to extract information. */
6022
- DOM_SCRAPING,
6022
+ DOM_SCRAPING = "DOM_SCRAPING",
6023
6023
  /** The offscreen document needs to interact with Blob objects (including URL.createObjectURL()). */
6024
- BLOBS,
6024
+ BLOBS = "BLOBS",
6025
6025
  /** The offscreen document needs to use the DOMParser API. */
6026
- DOM_PARSER,
6026
+ DOM_PARSER = "DOM_PARSER",
6027
6027
  /** The offscreen document needs to interact with media streams from user media (e.g. getUserMedia()). */
6028
- USER_MEDIA,
6028
+ USER_MEDIA = "USER_MEDIA",
6029
6029
  /** The offscreen document needs to interact with media streams from display media (e.g. getDisplayMedia()). */
6030
- DISPLAY_MEDIA,
6030
+ DISPLAY_MEDIA = "DISPLAY_MEDIA",
6031
6031
  /** The offscreen document needs to use WebRTC APIs. */
6032
- WEB_RTC,
6032
+ WEB_RTC = "WEB_RTC",
6033
6033
  /** The offscreen document needs to interact with the clipboard APIs(e.g. Navigator.clipboard). */
6034
- CLIPBOARD
6034
+ CLIPBOARD = "CLIPBOARD"
6035
6035
  }
6036
6036
 
6037
6037
  /** The parameters describing the offscreen document to create. */
@@ -6303,6 +6303,11 @@ declare namespace chrome.permissions {
6303
6303
  addListener(callback: (permissions: Permissions) => void): void;
6304
6304
  }
6305
6305
 
6306
+ /**
6307
+ * Checks if the extension has the specified permissions.
6308
+ * @return A Promise that resolves with boolean: True if the extension has the specified permissions.
6309
+ */
6310
+ export function contains(permissions: Permissions): Promise<boolean>;
6306
6311
  /**
6307
6312
  * Checks if the extension has the specified permissions.
6308
6313
  * @param callback The callback parameter should be a function that looks like this:
@@ -6310,6 +6315,11 @@ declare namespace chrome.permissions {
6310
6315
  * Parameter result: True if the extension has the specified permissions.
6311
6316
  */
6312
6317
  export function contains(permissions: Permissions, callback: (result: boolean) => void): void;
6318
+ /**
6319
+ * Gets the extension's current set of permissions.
6320
+ * @return A Promise that resolves with Permissions object describing the extension's active permissions.
6321
+ */
6322
+ export function getAll(): Promise<Permissions>;
6313
6323
  /**
6314
6324
  * Gets the extension's current set of permissions.
6315
6325
  * @param callback The callback parameter should be a function that looks like this:
@@ -6317,6 +6327,11 @@ declare namespace chrome.permissions {
6317
6327
  * Parameter permissions: The extension's active permissions.
6318
6328
  */
6319
6329
  export function getAll(callback: (permissions: Permissions) => void): void;
6330
+ /**
6331
+ * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
6332
+ * @return A Promise that resolves with boolean: True if the user granted the specified permissions.
6333
+ */
6334
+ export function request(permissions: Permissions): Promise<boolean>;
6320
6335
  /**
6321
6336
  * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
6322
6337
  * @param callback If you specify the callback parameter, it should be a function that looks like this:
@@ -6324,6 +6339,11 @@ declare namespace chrome.permissions {
6324
6339
  * Parameter granted: True if the user granted the specified permissions.
6325
6340
  */
6326
6341
  export function request(permissions: Permissions, callback?: (granted: boolean) => void): void;
6342
+ /**
6343
+ * Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
6344
+ * @return A Promise that resolves with boolean: True if the permissions were removed.
6345
+ */
6346
+ export function remove(permissions: Permissions): Promise<boolean>;
6327
6347
  /**
6328
6348
  * Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
6329
6349
  * @param callback If you specify the callback parameter, it should be a function that looks like this:
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.210",
3
+ "version": "0.0.212",
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": "1b96144927e9fdbe3bbaea4b866d276a1c4a71b590a0c7df9b7662de34a0a16e",
91
+ "typesPublisherContentHash": "69819e9db9fc8a004b75dcb85c1bebdb4a363bf067b8b551ad4f57178d99a0d6",
92
92
  "typeScriptVersion": "4.2"
93
93
  }