import {AppDoc, AppDocsStore} from "./AppDocsStore"; class InMemoryAppDocsStore implements AppDocsStore { private byApp = new Map>(); async replaceForApp(appId : string, docs : Array) : Promise { this.byApp.set(appId, docs.map(doc => ({ ...doc }))); } async listForApp(appId : string) : Promise> { return (this.byApp.get(appId) ?? []).map(doc => ({ ...doc })); } } export { InMemoryAppDocsStore }