Skip to content

Function: diff() ​

ts
function diff(prev, next): Patch | null | undefined;

Defined in: patch.ts:33

The patch that turns prev into next. Returns undefined when they are equal, and null when they cannot be patched because one of them is not a plain object: send next whole in that case.

next is read as JSON would write it: keys holding undefined count as absent.

Parameters ​

ParameterType
prevunknown
nextunknown

Returns ​

Patch | null | undefined

MIT licence. Tickflare is an independent project and is not affiliated with Cloudflare.