export class MemoryArticleStorage {
  constructor() {
    this._map = new Map(); // key -> {data, final}
  }
  async writeDraft(key, data) { this._map.set(key, {data, final:false}); }
  async writeFinal(key, data) { this._map.set(key, {data, final:true}); }
  async hasFinal(key) { return this._map.get(key)?.final === true; }
  async readFinal(key) { return this._map.get(key)?.data; }
  count() { return this._map.size; }
}
