Event<EM extends EventMapBase = EventMapBase, C extends keyof EM & string = keyof EM & string, T extends keyof EM[C] & string = keyof EM[C] & string, P = EM[C][T]>

interface
types.ts:101

A single event object: { channel, type, payload, id }, plus optional meta.

- The id field is automatically added by the store to enable deduplication, unless the emitter supplies one via EmitOptions.id. - Used for preventing duplicate event processing (e.g., React Strict Mode). - meta is present only when EmitOptions.meta was supplied. See EventMeta.

Type parameters

NameTypeDescription
EMextends EventMapBaseEvent map.
Cextends keyof EM & stringChannel key.
Textends keyof EM[C] & stringType key within channel C.
PPayload type (defaults to EM[C][T]).

Properties

NameTypeDescription
channelC
depth?numberHow many events deep in a causal chain this one is. A root event is depth 0; an event emitted while handling it is 1, and so on.
idstringUnique identifier for deduplication and devtools tracking (automatically added by store)
meta?Readonly<Record<string, unknown>>Optional caller-supplied metadata, carried through the pipeline untouched. Absent entirely unless EmitOptions.meta was supplied. See EventMeta.
parentId?stringThe id of the event whose handling caused this one, when there was one.
payloadP
typeT