Function: applyPatches()
function applyPatches(
node,
patches,
reverse?
): void;
Applies the given patches to the given target object. Automatic type checking validates the completed batch, including nested lists. A batch that throws or is rejected is rolled back with compensating patches. Errors thrown by listeners do not roll it back.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
node | object | undefined | Target object. |
patches | | readonly Patch[] | readonly readonly Patch[][] | undefined | List of patches to apply. |
reverse | boolean | false | Whether patches are applied in reverse order. |
Returns
void