The IEventBus contract defines a way for dispatching and listening to events independent of underlying technology. It commes with more convient methods compared to IEventBusAdapter.
The getGroup method returns the complete group.
import { type IEventBus } from "@daiso-tech/core";async function main(eventBus: IEventBus): Promise<void> { // Will be "@root" console.log(eventBus.getGroup()) const eventBusA = eventBus.withGroup("a"); // Will be "@root/a" console.log(eventBusA.getGroup())} Copy
import { type IEventBus } from "@daiso-tech/core";async function main(eventBus: IEventBus): Promise<void> { // Will be "@root" console.log(eventBus.getGroup()) const eventBusA = eventBus.withGroup("a"); // Will be "@root/a" console.log(eventBusA.getGroup())}
The IEventBus contract defines a way for dispatching and listening to events independent of underlying technology. It commes with more convient methods compared to IEventBusAdapter.