A string-keyed event bus is quick to write and just as quick to get
wrong - emit('user:login', {}) with the wrong shape fails silently.
Anchor the whole thing to one Record<eventName, payload> map instead,
and on / emit type-check against it, with the payload narrowed per
event.
@itsnas usage.ts
codeusage.ts
main
Nas (@itsnas)
main
Nas (@itsnas)