Remove get/set from repository too
This commit is contained in:
@@ -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')
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user