Remove get/set from repository too

This commit is contained in:
Jon Staab
2024-05-27 16:48:29 -07:00
parent f98083290b
commit a4948fe5dc
+3 -7
View File
@@ -29,13 +29,7 @@ export class Repository extends Emitter {
super() super()
} }
// Compatibliity with stores // Dump/load/clear
get = () => this.dump()
set = (events: TrustedEvent[], chunkSize = 1000) => this.load(events, chunkSize)
// Dump/load
dump() { dump() {
return Array.from(this.eventsById.values()) return Array.from(this.eventsById.values())
@@ -64,6 +58,8 @@ export class Repository extends Emitter {
this.deletes.clear() this.deletes.clear()
} }
// Notify methods
notifyUpdate = maybeThrottle(this.options.throttle, () => { notifyUpdate = maybeThrottle(this.options.throttle, () => {
this.emit('update') this.emit('update')
}) })