Skip to content

off

off<T, K>(topic, listener): void

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

Unsubscribes a callback from an event topic.

Note: you can also unsubscribe using the function returned by on.

T extends Topics = Topics

A map of topic names and their emitted value types.

K extends string | number | symbol = keyof T

The topic name to unsubscribe from.

K

The topic name to unsubscribe from.

Listener<T[K]>

The listener callback to unsubscribe.

void