CRUDUI

Home > @polyspec/crudui-generator-core > recordChange

recordChange() function

Record the record before a change. A value edit on the same path as the previous value edit shares its entry; every other change adds an entry, dropping the oldest beyond HISTORY_LIMIT.

Signature:

export declare function recordChange<T>(history: History<T>, previous: T, path?: string): History<T>;

Parameters

Parameter

Type

Description

history

History<T>

previous

T

path

string

(Optional)

Returns:

History<T>