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()
}
// Compatibliity with stores
get = () => this.dump()
set = (events: TrustedEvent[], chunkSize = 1000) => this.load(events, chunkSize)
// Dump/load
// Dump/load/clear
dump() {
return Array.from(this.eventsById.values())
@@ -64,6 +58,8 @@ export class Repository extends Emitter {
this.deletes.clear()
}
// Notify methods
notifyUpdate = maybeThrottle(this.options.throttle, () => {
this.emit('update')
})