Skip to content

changedOnly

changedOnly(cur, patch): Record<string, unknown> | null

The part of a patch that changes cur: leaves equal to the current value are left out, a null for a key that is not there too, lists equal by their JSON text. Null = nothing changes. So a game may write whole objects every step: only what changed is applied, counted and sent.

Record<string, unknown>

Record<string, unknown>

Record<string, unknown> | null