Function: applyPatch()
ts
function applyPatch(
documentData,
path,
value,
ctx
): DocumentData;Defined in: domain/shadow-model.ts:169
Returns a copy of the document data with value written at path. The value is coerced to the schema type at that path and the result is normalized again. The input data is not modified.
Parameters
| Parameter | Type |
|---|---|
documentData | DocumentData |
path | (string | number)[] |
value | any |
ctx | SchemaContext |