mirror of
https://github.com/luxfhe/example-blind-auction-v2.git
synced 2026-10-30 18:13:35 +00:00
16 lines
271 B
TypeScript
16 lines
271 B
TypeScript
import mitt from 'mitt'
|
|
|
|
type ApplicationEvents = {
|
|
'network:connected': boolean
|
|
};
|
|
|
|
const emitter = mitt<ApplicationEvents>()
|
|
const emitEvent = emitter.emit
|
|
const listenToEvent = emitter.on
|
|
|
|
const EventBus = {
|
|
emitEvent,
|
|
listenToEvent,
|
|
};
|
|
|
|
export default EventBus; |