TinyBase logoTinyBase

Persists

The Persists enum is used to indicate whether a Persister can support a regular Store, a MergeableStore, or both.

{
  StoreOnly: 1;
  MergeableStoreOnly: 2;
  StoreOrMergeableStore: 3;
}
ValueDescription
StoreOnly1

Indicates that only a regular Store can be supported by a Persister.

MergeableStoreOnly2

Indicates that only a MergeableStore can be supported by a Persister.

StoreOrMergeableStore3

Indicates that either a regular Store or a MergeableStore can be supported by a Persister.

The enum is intended to be used by the author of a Persister to indicate which types of store can be persisted. If you discover type errors when trying to instantiate a Persister, it is most likely that you are passing in an unsupported type of store.

See the createCustomPersister method for an example of this enum being used.

Since

v5.0.0