import { Batch } from '../../types' import { Database } from '../database.types' export class MemoryStorage implements Database { #items: Batch[] constructor() { this.#items = [] } async reset(): Promise { this.#items = [] } async setItem(item: Batch): Promise { this.#items.push(item) } getItem(id: string): Promise { throw new Error('Method not implemented.' + id) } removeItem(id: string): Promise { throw new Error('Method not implemented.' + id) } getAllItems() { return Promise.resolve(this.#items) } }