RecoverableStateOptions <TStateModel>
Hierarchy
- RecoverableStatePersistenceOptions
- RecoverableStateOptions
Index
Properties
optionalconfig
Configuration instance to use
defaultState
The default state used if no persisted state is found. A deep copy is made each time the state is used.
optionaldeserialize
Optional function to transform a JSON-serialized object back to the state model. If not provided, JSON.parse is used. It is advisable to perform validation in this function and to throw an exception if it fails.
Type declaration
Parameters
serializedState: string
Returns TStateModel
optionallogger
A logger instance for logging operations related to state persistence
optionalinheritedpersistenceEnabled
Flag to enable or disable state persistence
inheritedpersistStateKey
The key under which the state is stored in the KeyValueStore
optionalinheritedpersistStateKvsId
The identifier of the KeyValueStore to use for persistence. If neither a name nor an id are supplied, the default store will be used.
optionalinheritedpersistStateKvsName
The name of the KeyValueStore to use for persistence. If neither a name nor an id are supplied, the default store will be used.
optionalserialize
Optional function to transform the state to a JSON string before persistence. If not provided, JSON.stringify will be used.
Type declaration
Parameters
state: TStateModel
Returns string
Options for configuring the RecoverableState