/** * Base Storage Service * Abstract base class providing common functionality for all storage implementations */ import type { StorageItem } from "../../models/storageItem"; import type { IStorageService } from "./IStorageService"; /** * Abstract base class for storage services */ export declare abstract class BaseStorageService implements IStorageService { protected storageAvailable: boolean; protected abstract readonly storageType: string; protected storage: Storage | null; constructor(); /** * Check if storage is available */ isAvailable(): boolean; /** * Save a storage item */ abstract save(key: string, value: string): void; /** * Retrieve a storage item */ abstract retrieve(key: string): StorageItem | null; /** * Remove a storage item */ abstract remove(key: string): void; /** * Clear all items */ abstract clear(): void; /** * Check if storage type is available * Reference: MDN Web Docs * https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API */ protected checkAvailability(): boolean; /** * Get the underlying storage object */ protected abstract getStorage(): Storage | null; /** * Throw error if storage is unavailable */ protected throwIfUnavailable(): void; } //# sourceMappingURL=BaseStorageService.d.ts.map