Skip to main content

Function: applySnapshot()

function applySnapshot<T>(node, snapshot): void;

Applies a full snapshot over an object, reconciling it with the current contents of the object. If it throws, the changes it made are rolled back (errors thrown by listeners do not roll them back).

Type Parameters​

Type ParameterDescription
T extends objectObject type.

Parameters​

ParameterTypeDescription
nodeTTarget object (model object, object or array).
snapshot| SnapshotInOf<T> | SnapshotOutOf<T>Snapshot to apply.

Returns​

void