import { StorageInterface, StorageValueType, StorageRecordInterface } from '@drupal-js-sdk/interfaces'; declare class StorageInMemory implements StorageInterface { protected data: { [key: string]: StorageValueType; }; constructor(); getString(keyName: string): string | null; setString(keyName: string, keyValue: string): void; isAvailable(): boolean; /** * When passed a key name, will return that key's value. */ getItem(keyName: string): StorageValueType; /** * When passed a key name and value, will add that key to the storage, * or update that key's value if it already exists. */ setItem(keyName: string, keyValue: StorageValueType): void; /** * When passed a key name, will remove that key from the storage. */ removeItem(keyName: string): void; /** * When invoked, will empty all keys out of the storage. */ clear(): void; get(): StorageRecordInterface; set(data: StorageRecordInterface): void; } type WebStorageInterface = Storage; declare class StorageInWeb implements StorageInterface { private readonly storage; constructor(getStorage?: () => WebStorageInterface); getString(keyName: string): string | null; setString(keyName: string, keyValue: string): void; isAvailable(): boolean; /** * When passed a key name, will return that key's value. */ getItem(keyName: string): StorageValueType; /** * When passed a key name and value, will add that key to the storage, * or update that key's value if it already exists. */ setItem(keyName: string, keyValue: StorageValueType): void; /** * When passed a key name, will remove that key from the storage. */ removeItem(keyName: string): void; /** * When invoked, will empty all keys out of the storage. */ clear(): void; get(): StorageRecordInterface; set(data: StorageRecordInterface): void; } export { StorageInMemory, StorageInWeb };