Type Parameters
- Events extends Record<string, unknown>
Constructors
Methods
on
- on<K>(event, handler): (() => void)
Type Parameters
- K extends string | number | symbol
Returns (() => void)
off
- off<K>(event, handler): void
Type Parameters
- K extends string | number | symbol
Returns void
emit
- emit<K>(event, payload): void
Type Parameters
- K extends string | number | symbol
Returns void
clear
- clear(): void
Returns void
Minimal typed pub/sub. Not React-specific — wrappers subscribe to this directly and re-expose it as a hook; the app can also subscribe independently.