charton API / @chart-on/core / index / Autosave
Interface: Autosave
Defined in: packages/core/src/storage/autosave.ts:27
A running autosave from autosave: shows whether a save is pending, and saves, drops or stops it.
Properties
pending
readonlypending:boolean
Defined in: packages/core/src/storage/autosave.ts:29
A change is waiting for the delay.
Methods
cancel()
cancel():
void
Defined in: packages/core/src/storage/autosave.ts:33
Drop a pending change without saving it.
Returns
void
flush()
flush():
Promise<void>
Defined in: packages/core/src/storage/autosave.ts:31
Save a pending change now. Resolves once it is saved (at once when nothing is pending).
Returns
Promise<void>
stop()
stop():
void
Defined in: packages/core/src/storage/autosave.ts:35
Stop listening; a pending change is dropped (call flush first to keep it).
Returns
void