Skip to content

emit

emit<T, K>(topic, value, instanceID?): void

Defined in: astrobase/src/events/events.ts:42

Emits an event. While this is a public API, This should generally only be called for custom topics. See the module overview of Events for more on custom topics.

T extends Topics = Topics

A map of topic names and their emitted value types.

K extends string | number | symbol = keyof T

The topic name for this emitted event.

K

The topic name for this emitted event.

T[K]

The emitted value.

string

The instance that the event occurred within.

void