foundation-store.abstractstore
Home > @genesislcap/foundation-store > AbstractStore
AbstractStore class
The abstract store that concrete store fragments must extend, which differs from the AbstractStoreRoot.
Signature:
export declare abstract class AbstractStore<TStore extends Store, TEventDetailMap extends EventDetailMap, TInternalEventDetailMap extends EventDetailMap = TEventDetailMap, TStoreRoot extends StoreRoot = StoreRoot> implements Store
Implements: Store
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
string | null |
The broadcast channel name to enable cross-window synchronization. If set, events emitted with { broadcast: true } will be sent to this channel. | |
|
|
this |
(BETA) The value commit proxy. | |
|
|
<TDetail = void, TReturn = void>(keys: KeyOrKeys<TEventDetailMap & TInternalEventDetailMap>, token: (detail: TDetail, event?: CustomEvent<TDetail>) => Promise<TReturn>) => EventListener |
Creates an async event listener. | |
|
|
<TDetail extends Error = Error>(keys: KeyOrKeys<TEventDetailMap & TInternalEventDetailMap>, token?: (detail: TDetail, event?: CustomEvent<TDetail>) => void) => EventListener |
Creates an error event listener. | |
|
|
<TDetail = void>(keys: KeyOrKeys<TEventDetailMap & TInternalEventDetailMap>, token: (detail: TDetail, event?: CustomEvent<TDetail>) => void) => EventListener |
Creates an event listener. | |
|
ErrorMap<TEventDetailMap & TInternalEventDetailMap> |
Contains any errors the store may have, see ErrorMap. | ||
|
|
string |
The name of the store fragment. | |
|
|
TStoreRoot |
The store root fragment. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Lazily add store fragments. | ||
|
binding(token, subscriberChangeCallback, isVolatileBinding, context) |
An api to allow the observation of values and arbitrary bindings outside the template engine. | |
|
|
(BETA) Alternative value commit api. | |
|
Connects this store fragment. | ||
|
Disconnects this store fragment. | ||
|
|
Emit events to the stores directly via the standard event flow. | |
|
|
A convenience method to invoke an async api and emit success and error events. | |
|
Lazily remove store fragments. |