La referencia de la API está disponible solo en inglés por ahora.

patchesFromChange

function
patch-utils.ts:110
signature
patchesFromChange(changedPaths, prevValues, nextValues): JsonPatch[]

Builds RFC 6902 JSON Patch operations directly from a core InstrumentedEvent: the changed dotted leaf paths plus their old/new values.

Parameters

NameTypeDescription
changedPathsstring[]Dotted leaf paths that changed (slice-prefixed).
NameTypeDescription
prevValuesRecord<string, unknown>Old value at each changed path, keyed by path.
NameTypeDescription
nextValuesRecord<string, unknown>New value at each changed path, keyed by path.

Returns

JsonPatch[], Array of JsonPatch operations describing the state transition.