TinyBase logoTinyBase β

StatusListener

The StatusListener type describes a function that is used to listen to changes to the loading and saving status of the Persister.

(
  persister: Persister<Persist>,
  status: Status,
): void
TypeDescription
persisterPersister<Persist>

A reference to the Persister that changed.

statusStatus

The new loading or saving Status.

returnsvoid

This has no return value.

A StatusListener is provided when using the addStatusListener method. See that method for specific examples.

When called, a StatusListener is given a reference to the Persister and the new Status: 0 means now idle, 1 means now loading, and 2 means now saving.

Since

v5.3.0