Emit<EM extends EventMapBase>
typeEmits an event.
**Channel and type are joined into one key,
"channel::type",** and dispatch, deduplication and
introspection all key on it. So two different pairs can collapse together: ("a::b", "c") and
("a", "b::c") both become "a::b::c", and a subscriber registered for one is invoked for the
other, while a dedup window lets one drop the other.
A :: in a channel is fine on its own, it is how a peer's channel is namespaced, so development builds warn on the **collision**, naming both pairs, rather than on the
separator. Nothing throws.Definition
type
type Emit<EM extends EventMapBase> = (channel: C, type: T, payload: EM[C][T], opts?: EmitOptions) => Promise<EmitResult>(channel: C, type: T, payload: EM[C][T], opts?: EmitOptions) => Promise<EmitResult>
Type parameters
| Name | Type | Description |
|---|---|---|
EM | extends EventMapBase |