Initial commit

This commit is contained in:
Fabricio Giglio
2026-05-06 17:56:38 +02:00
commit 8f4df1451e
78 changed files with 12130 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import mitt, { type Emitter } from "mitt";
import type { SyncEventMap } from "@bach-to-basics/shared";
// mitt's generic constraint requires Record<string | symbol, unknown>.
// We cast our typed map through a compatible intermediate type.
type BusEvents = SyncEventMap & Record<string | symbol, unknown>;
const bus = mitt<BusEvents>();
export type EventBus = Emitter<BusEvents>;
export default bus;