TinyBase logoTinyBase β

WillDelValueCallback

The WillDelValueCallback type describes a function that is called before a Value is deleted from the Store.

(valueId: Id): boolean
TypeDescription
valueIdId

The Id of the Value being deleted.

returnsboolean

true to allow the deletion, false to prevent it.

The callback receives the value Id of the Value about to be deleted. It returns true to allow the deletion, or false to prevent it.

Multiple WillDelValueCallback functions can be registered and they will be called sequentially. If any callback returns false, the chain short-circuits and the Value will not be deleted.

Since

v8.0.0