The data object. Read-only.
Private
draftPrivate
eventPrivate
innerPrivate
inversePrivate
patchesReturns an array of the errors associated with the changeset.
Returns a boolean indicating whether the changeset is dirty (has changes).
Returns a boolean indicating whether the changeset is invalid (has errors).
Returns a boolean indicating whether the changeset is pristine (has no changes).
Returns a boolean indicating whether the changeset is valid (has no errors).
Adds a new error
object to the changeset.
The error object to add.
Private
normalizedRegisters a callback function to be called whenever a property is set using the set
method.
The callback function to register.
A function that can be called to unregister the callback.
Private
resetSets the value of the specified key
to the given value
in the draft
object.
Runs the specified validation
function on the draft
object.
The validation function to run.
A class that represents a changeset for a given data object. It uses Immer to create a draft of the data object and track changes made to it. The changes can be applied, reverted, validated, and saved.