Skip to content

@graphty/graphty-element / extend / AutosaveConflict

Class: AutosaveConflict ​

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

The rejection of a commit whose expectedGen no longer matches the stored entry: another writer committed to it first. Nothing in the commit was written.

Extends ​

  • Error

Constructors ​

Constructor ​

new AutosaveConflict(id, expectedGen, storedGen): AutosaveConflict

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

Builds the rejection a store gives a commit whose fence failed.

Parameters ​

id ​

string

the entry

expectedGen ​

number

the generation the write expected

storedGen ​

number

the generation the store holds

Returns ​

AutosaveConflict

Overrides ​

Error.constructor

Properties ​

expectedGen ​

readonly expectedGen: number

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

The generation the write expected.


id ​

readonly id: string

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

The entry whose generation did not match.


storedGen ​

readonly storedGen: number

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

The generation the store holds (0 when the entry does not exist).