Interface BindingConstructorArgs<GetType>

Post-initializer arguments used to configure bindings

interface BindingConstructorArgs<GetType> {
    areEqual?: ((a: GetType, b: GetType) => boolean);
    detectChanges?: boolean;
    id: string;
    setValueTransformer?: SetValueTransformer<GetType>;
}

Type Parameters

  • GetType = any

Hierarchy (view full)

Properties

areEqual?: ((a: GetType, b: GetType) => boolean)

If specified, overrides the function used to compare values

_.isEqual, which can be globally overridden using setAreEqual

detectChanges?: boolean
  • If trueareEqual is used to compare the old and new values when set/setRaw are called. If the values are equal, the binding value won't be changed. If they're unequal, the binding value will be changed and listeners will be notified.
  • If false – old and new values aren't compared when set/setRaw are called. The binding will always be changed and listeners will always be notified.

false

id: string

A technical, but human-readable ID, which isn't guaranteed to be unique

setValueTransformer?: SetValueTransformer<GetType>

A transformer function called prior to storing the value when using the set method

The proposed new value

The binding being updated

The transformed value to set the binding to