Skip to content

@graphty/graphty-element / extend / AutosaveCommitOptions

Interface: AutosaveCommitOptions ​

Defined in: graphty-element/src/autosave/types.ts:49

Options for one commit. A store may ignore any of them.

Properties ​

durability? ​

readonly optional durability?: "strict" | "relaxed"

Defined in: graphty-element/src/autosave/types.ts:54

"relaxed" (the default) reports a commit once the data reached the operating system; "strict" waits until it is flushed to disk.


onProgress? ​

readonly optional onProgress?: () => void

Defined in: graphty-element/src/autosave/types.ts:63

Called each time the commit makes progress, such as a request inside it completing. The writer treats a commit as stalled only after 10 s with no progress, so a store that calls it is not aborted on a page whose main thread is busy; a store that never calls it is given 10 s for the whole commit.

Returns ​

void


signal? ​

readonly optional signal?: AbortSignal

Defined in: graphty-element/src/autosave/types.ts:56

Aborting it abandons the commit: nothing is written, and the promise rejects with an AbortError.