import mitt, { Emitter } from "mitt";

const emitter: Emitter<Record<string, unknown>> = mitt();

const bus = {
  $on: emitter.on.bind(emitter),
  $off: emitter.off.bind(emitter),
  $emit: emitter.emit.bind(emitter),
};

export default bus;