MCPcopy Index your code
hub / github.com/tinyplex/tinybase / startAutoSave

Function startAutoSave

src/persisters/common/create.ts:296–306  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 3

stopAutoSaveFunction · 0.70
saveFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…