I
EventBusKey
testeddemoA branded `Symbol` that carries the bus' event type so a typed key can be shared across modules without re-declaring generics at every call site.
Example
ts
const fooKey: EventBusKey<{ id: number }> = Symbol('foo');
const bus = useEventBus(fooKey); // inferred as UseEventBusReturn<{ id: number }>Demo
Loading demo…
Signature
ts
interface EventBusKey<T> extends SymbolType Parameters
T