()
| 294 | }; |
| 295 | |
| 296 | const startAutoSave = async (): Promise<Persister<Persist>> => { |
| 297 | stopAutoSave(); |
| 298 | await save(); |
| 299 | autoSaveListenerId = store.addDidFinishTransactionListener(() => { |
| 300 | const changes = getChanges() as any; |
| 301 | if (hasChanges(changes)) { |
| 302 | save(changes); |
| 303 | } |
| 304 | }); |
| 305 | return persister; |
| 306 | }; |
| 307 | |
| 308 | const stopAutoSave = async (): Promise<Persister<Persist>> => { |
| 309 | if (autoSaveListenerId) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…