Skip to content

Omnibus

Event Bus TypeScript Library

The only event library you will ever need

Omnibus LogoOmnibus Logo

Omnibus 101

ts
import { 
BusBuilder
,
args
} from '@hypersphere/omnibus'
const
bus
=
BusBuilder
.
init
()
.
register
('transaction',
args
<{
amount
: number }>())
.
build
()
bus
.
on
('transaction',
t
=> {
console
.
log
(
t
)
})
bus
.
trigger
('transaction', {
amount
: 55
})