Interface: WireEvent<P, T, S>
Defined in: src/wirestate-core/plugin/events/events.ts:28
Event delivered to handlers: its type, optional payload, and optional source.
Remarks
payload and source are present only when the emitted value is not undefined. Other falsy values, such as null, 0, and false, are preserved.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
P | unknown | Payload type. |
T extends EventType | EventType | Event type. |
S | unknown | Source type. |
Properties
payload?
ts
readonly optional payload?: P;Defined in: src/wirestate-core/plugin/events/events.ts:37
Payload supplied by the emitter, when one was provided.
source?
ts
readonly optional source?: S;Defined in: src/wirestate-core/plugin/events/events.ts:42
Source supplied by the emitter, when one was provided.
type
ts
readonly type: T;Defined in: src/wirestate-core/plugin/events/events.ts:32
Event type used for matching subscriptions.