Configuration options for PropChangeTracker.

interface Options<T extends object, K extends keyof T> {
    defaultEquals?: EqualityComparator<unknown>;
    equals?: EqualityComparators<T, K>;
    initialMode?: "undefined" | "changed" | "baseline";
    keys: readonly K[];
}

Type Parameters

  • T extends object
  • K extends keyof T
Index
defaultEquals?: EqualityComparator<unknown>

Equality comparator used when a property-specific comparator is not supplied.

Object.is

Optional equality comparators for individual properties.

initialMode?: "undefined" | "changed" | "baseline"

Controls the result of the first check after construction or PropChangeTracker.reset.

  • 'changed': every tracked property is reported as changed.
  • 'baseline': the first values establish the baseline and no changes are reported.
  • 'undefined': each first value is compared against undefined.

'changed'

keys: readonly K[]

Properties to track. The order is retained when iterating changed properties or calling PropChangeTracker.Data.ChangeSet.toArray.