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