Optional
autoOptional
disableDon't want events to be dispatched? Set this to true. Defaults to false.
The load function. Must be provided. As the name suggests, this is a function responsible for loading the data that are going to catchd. It may return a primitive value, an object or a promise, so also async functions are welcome. There are no constraints on how the value can obtained.
The return value of the loadFunction is handled as follows
Optional
persistenceSpecify the persistence method to use. You can supply a string that identify one of the default methods or an implementation of the PersistenceManager interface. Default persistence methods assume that the promise result is JSON-serializable. If this is not the case use a custom serialization method or avoid persistence. Currently there are 2 supported string values:
Optional
persistenceIf persisting on a default key-value storage (like localStorage or sessionStorage) this option specify the key to use to store data.
Generated using TypeDoc
Specify the autoflush policy. It can be an object that implements a custom logic or a number.
flush()
is called.Omitting this value or setting it to a value <= 0 will disable
autoFlush
entirely.