Skip to content

@graphty/graphty-element / session / SetChange

Interface: SetChange ​

Defined in: graphty-element/src/session/sets/types.ts:50

One kept set's committed change. One per touched key per write.

Properties ​

cause ​

readonly cause: "load" | "command" | "undo" | "redo"

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

What caused it. OPEN UNION: command, load for a stored slice, or undo and redo for a history call (a restore across several steps is told as the direction it moved).


change ​

readonly change: "created" | "updated" | "removed"

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

OPEN UNION.


fields ​

readonly fields: readonly ("name" | "order" | "definition")[]

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

Which fields an updated change touched; empty otherwise. OPEN UNION.


id ​

readonly id: string

Defined in: graphty-element/src/session/sets/types.ts:52

The set that changed.


set ​

readonly set: ElementSet | null

Defined in: graphty-element/src/session/sets/types.ts:58

The frozen record after the change; null after removal.