Interface BindingConstructorArgs<GetType>

Post-initializer arguments used to configure bindings

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

Type Parameters

  • GetType = any

Hierarchy (view full)

Properties

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

If specified, overrides the function used to compare values

Type declaration

    • (a, b): boolean
    • If specified, overrides the function used to compare values

      Parameters

      Returns boolean

      Default Value

      _.isEqual, which can be globally overridden using setAreEqual

Default Value

_.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.

Default Value

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

Param: newValue

The proposed new value

Param: thisBinding

The binding being updated

Returns

The transformed value to set the binding to

Generated using TypeDoc