import { Store, StorageObject } from './types' /** * Data Storage using in memory object */ export class MemoryStorage implements Store { private cache: Record = {} get(key: K): Data[K] | null { return (this.cache[key] ?? null) as Data[K] | null } set(key: K, value: Data[K] | null): void { this.cache[key] = value } remove(key: K): void { delete this.cache[key] } }