1
0
mirror of https://github.com/koloml/philomena-tagging-assistant.git synced 2026-09-23 04:19:39 +00:00

Removing extensions for JS and TS in imports, reformatting

This commit is contained in:
2025-02-06 23:20:28 +04:00
parent 2c2c2acf3e
commit b9a609a190
65 changed files with 171 additions and 172 deletions

View File

@@ -4,12 +4,12 @@
*/
class StorageHelper {
/**
* @type {import('@types/chrome').storage.StorageArea}
* @type {chrome.storage.StorageArea}
*/
#storageArea;
/**
* @param {import('@types/chrome').storage.StorageArea} storageArea
* @param {chrome.storage.StorageArea} storageArea
*/
constructor(storageArea) {
this.#storageArea = storageArea;
@@ -39,7 +39,7 @@ class StorageHelper {
/**
* Subscribe to changes in the local storage.
* @param {function(Record<string, StorageChange>): void} callback
* @param {function(Record<string, chrome.storage.StorageChange>): void} callback
*/
subscribe(callback) {
this.#storageArea.onChanged.addListener(callback);
@@ -47,11 +47,11 @@ class StorageHelper {
/**
* Unsubscribe from changes in the local storage.
* @param {function(Record<string, StorageChange>): void} callback
* @param {function(Record<string, chrome.storage.StorageChange>): void} callback
*/
unsubscribe(callback) {
this.#storageArea.onChanged.removeListener(callback);
}
}
export default StorageHelper;
export default StorageHelper;