Skip to main content

Interface: ChromeStorageAreaLike

The part of a chrome.storage area (storageAdapterFromChromeStorage) the adapter uses, written structurally so the SDK needs no chrome types: chrome.storage.local, chrome.storage.session, browser.storage.local (webextension-polyfill) and any object with these two promise-returning methods satisfy it. It is the Manifest V3 promise form: the methods are called WITHOUT a callback.

Methods​

get()​

get(key): Promise<Record<string, unknown>>

Parameters​

ParameterType
keystring

Returns​

Promise<Record<string, unknown>>


set()​

set(items): Promise<void>

Parameters​

ParameterType
itemsRecord<string, unknown>

Returns​

Promise<void>