import { MayBePromise } from '../types'; import { StorageProvider } from './interface'; export class InMemoryStorageProvider implements StorageProvider { private readonly storage = Object.create(null); get(key: string): MayBePromise { return this.storage[key] ?? null; } put(key: string, value: T): MayBePromise { this.storage[key] = value; } delete(key: string): MayBePromise { delete this.storage[key]; } }