Class: StateStoreBaseClass<ConfigType>
PURISTA API / Modules / @purista/core / StateStoreBaseClass
Class: StateStoreBaseClass<ConfigType>
@purista/core.StateStoreBaseClass
Base class for config store implementations
Type parameters
Name | Type |
---|---|
ConfigType | extends Record <string , unknown > = {} |
Hierarchy
StateStoreBaseClass
Implements
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new StateStoreBaseClass<ConfigType
>(name
, config
): StateStoreBaseClass
<ConfigType
>
Type parameters
Name | Type |
---|---|
ConfigType | extends Record <string , unknown > = {} |
Parameters
Name | Type |
---|---|
name | string |
config | { [K in string | number | symbol]: (Object & ConfigType)[K] } |
Returns
StateStoreBaseClass
<ConfigType
>
Defined in
core/StateStore/StateStoreBaseClass.impl.ts:17
Properties
config
• config: { [K in string | number | symbol]: (Object & ConfigType)[K] }
Defined in
core/StateStore/StateStoreBaseClass.impl.ts:13
logger
• logger: Logger
Defined in
core/StateStore/StateStoreBaseClass.impl.ts:12
name
• name: string
name of store
Implementation of
Defined in
core/StateStore/StateStoreBaseClass.impl.ts:15
Methods
destroy
▸ destroy(): Promise
<void
>
disconnects and shuts down the state store
Returns
Promise
<void
>
Implementation of
Defined in
core/StateStore/StateStoreBaseClass.impl.ts:70
getState
▸ getState(...stateNames
): Promise
<Record
<string
, unknown
>>
Parameters
Name | Type |
---|---|
...stateNames | string [] |
Returns
Promise
<Record
<string
, unknown
>>
Implementation of
StateStore.getState
Defined in
core/StateStore/StateStoreBaseClass.impl.ts:32
removeState
▸ removeState(stateName
): Promise
<void
>
Parameters
Name | Type |
---|---|
stateName | string |
Returns
Promise
<void
>
Implementation of
StateStore.removeState
Defined in
core/StateStore/StateStoreBaseClass.impl.ts:45
setState
▸ setState(stateName
, stateValue
): Promise
<void
>
Parameters
Name | Type |
---|---|
stateName | string |
stateValue | unknown |
Returns
Promise
<void
>
Implementation of
StateStore.setState