Add documentation.

This commit is contained in:
Bauke 2023-04-25 12:32:38 +02:00
parent e266e9dd7b
commit 265ca87a90
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,13 @@ export type SerializedItem = {
/** The key prefix for {@link Item}s. */
export type ItemKeyPrefix = "item-" | "history-";
/**
* Returns the dedicated WebExtension storage area for a given
* {@link ItemKeyPrefix}.
*
* @param prefix The target {@link ItemKeyPrefix}.
* @returns The WebExtension storage area.
*/
export function storageForPrefix(
prefix: ItemKeyPrefix,
): browser.Storage.StorageArea {