@types/chrome 0.0.195 → 0.0.196

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: Fri, 19 Aug 2022 18:02:30 GMT
11
+ * Last updated: Thu, 01 Sep 2022 12:02:44 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
@@ -7854,6 +7854,20 @@ declare namespace chrome.storage {
7854
7854
  * Parameter items: Object with items in their key-value mappings.
7855
7855
  */
7856
7856
  get(keys: string | string[] | { [key: string]: any } | null, callback: (items: { [key: string]: any }) => void): void;
7857
+ /**
7858
+ * Sets the desired access level for the storage area. The default will be only trusted contexts.
7859
+ * @param accessOptions An object containing an accessLevel key which contains the access level of the storage area.
7860
+ * @return A void Promise.
7861
+ * @since Chrome 102
7862
+ */
7863
+ setAccessLevel(accessOptions: { accessLevel: AccessLevel }): Promise<void>;
7864
+ /**
7865
+ * Sets the desired access level for the storage area. The default will be only trusted contexts.
7866
+ * @param accessOptions An object containing an accessLevel key which contains the access level of the storage area.
7867
+ * @param callback Optional.
7868
+ * @since Chrome 102
7869
+ */
7870
+ setAccessLevel(accessOptions: { accessLevel: AccessLevel }, callback: () => void): void;
7857
7871
  /**
7858
7872
  * Fired when one or more items change within this storage area.
7859
7873
  * @param keys A single key to get, list of keys to get, or a dictionary specifying default values.
@@ -7910,6 +7924,14 @@ declare namespace chrome.storage {
7910
7924
  export interface StorageChangedEvent
7911
7925
  extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: AreaName) => void> { }
7912
7926
 
7927
+ type AccessLevel = keyof typeof AccessLevel;
7928
+
7929
+ /** The storage area's access level. */
7930
+ export var AccessLevel: {
7931
+ TRUSTED_AND_UNTRUSTED_CONTEXTS: 'TRUSTED_AND_UNTRUSTED_CONTEXTS',
7932
+ TRUSTED_CONTEXTS: 'TRUSTED_CONTEXTS'
7933
+ };
7934
+
7913
7935
  /** Items in the local storage area are local to each machine. */
7914
7936
  export var local: LocalStorageArea;
7915
7937
  /** Items in the sync storage area are synced using Chrome Sync. */
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.195",
3
+ "version": "0.0.196",
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",
@@ -93,6 +93,6 @@
93
93
  "@types/filesystem": "*",
94
94
  "@types/har-format": "*"
95
95
  },
96
- "typesPublisherContentHash": "8ff0cf531656b035cce43c232164d7453600f299b036db13715cbf871239332f",
97
- "typeScriptVersion": "4.0"
96
+ "typesPublisherContentHash": "ade96379cfac9d4a5497afcdf7f058b9aedac0f28bc58bf498fed6b81a141c5f",
97
+ "typeScriptVersion": "4.1"
98
98
  }