Skip to main content

Class: StateStoreBaseClass<ConfigType>


PURISTA API / Modules / @purista/core / StateStoreBaseClass

Class: StateStoreBaseClass<ConfigType>

@purista/core.StateStoreBaseClass

Base class for config store implementations

Type parameters

NameType
ConfigTypeextends Record<string, unknown> = {}

Hierarchy

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new StateStoreBaseClass<ConfigType>(name, config): StateStoreBaseClass<ConfigType>

Type parameters

NameType
ConfigTypeextends Record<string, unknown> = {}

Parameters

NameType
namestring
config{ [K in string | number | symbol]: (Object & ConfigType)[K] }

Returns

StateStoreBaseClass<ConfigType>

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:17open in new window

Properties

config

config: { [K in string | number | symbol]: (Object & ConfigType)[K] }

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:13open in new window


logger

logger: Logger

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:12open in new window


name

name: string

name of store

Implementation of

StateStore.name

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:15open in new window

Methods

destroy

destroy(): Promise<void>

disconnects and shuts down the state store

Returns

Promise<void>

Implementation of

StateStore.destroy

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:70open in new window


getState

getState(...stateNames): Promise<Record<string, unknown>>

Parameters

NameType
...stateNamesstring[]

Returns

Promise<Record<string, unknown>>

Implementation of

StateStore.getState

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:32open in new window


removeState

removeState(stateName): Promise<void>

Parameters

NameType
stateNamestring

Returns

Promise<void>

Implementation of

StateStore.removeState

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:45open in new window


setState

setState(stateName, stateValue): Promise<void>

Parameters

NameType
stateNamestring
stateValueunknown

Returns

Promise<void>

Implementation of

StateStore.setState

Defined in

core/StateStore/StateStoreBaseClass.impl.ts:58open in new window

Last update:
Contributors: Sebastian Wessel