foundation-store.abstractstore.emit
Home > @genesislcap/foundation-store > AbstractStore > emit
AbstractStore.emit() method
Emit events to the stores directly via the standard event flow.
Signature:
protected emit<K extends keyof (TEventDetailMap & TInternalEventDetailMap) & string>(...args: (TEventDetailMap & TInternalEventDetailMap)[K] extends void ? [key: K] : [key: K, detail: (TEventDetailMap & TInternalEventDetailMap)[K]]): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
args |
(TEventDetailMap & TInternalEventDetailMap)[K] extends void ? [key: K] : [key: K, detail: (TEventDetailMap & TInternalEventDetailMap)[K]] |
Returns:
void
Remarks
By default we allow stores to emit everything in their TEventDetailMap, however TInternalEventDetailMap can be provided to define additional internal events like x-success, x-error etc, or public events from other store fragments.