TinyBase logoTinyBase

InvalidValueListener

The InvalidValueListener type describes a function that is used to listen to attempts to set invalid data to a Value.

(
  store: Store,
  valueId: Id,
  invalidValues: any[],
): void
TypeDescription
storeStore

A reference to the Store that was being changed.

valueIdId

The Id of the Value that was being changed.

invalidValuesany[]

An array of the Values that were invalid.

returnsvoid

This has no return value.

An InvalidValueListener is provided when using the addInvalidValueListener method. See that method for specific examples.

When called, an InvalidValueListener is given a reference to the Store and the Id of Value that was being attempted to be changed. It is also given the invalid value of the Value, which could have been of absolutely any type. Since there could have been multiple failed attempts to set the Value within a single transaction, this is an array containing each attempt, chronologically.

Since

v3.0.0