WillSetValuesCallback
The WillSetValuesCallback type describes a function that is called before Values are set in the Store.
(values: Values): Values | undefined| Type | Description | |
|---|---|---|
values | Values | The |
| returns | Values | undefined | The |
The callback receives the Values object that is about to be set. It can return the Values (possibly transformed) to allow the write, or undefined to prevent the Values from being set.
Multiple WillSetValuesCallback functions can be registered and they will be called sequentially, the Values being updated successively. If any callback returns undefined, the chain short-circuits and the Values will not be set.
Since
v8.0.0