feat(core-events): IEventBus extends EventBusProtocol
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import type { z } from "zod";
|
import type { z } from "zod";
|
||||||
|
import type { EventBusProtocol } from "@repo/core-shared/di/bind-protocols";
|
||||||
import type { EventDescriptor } from "./event-descriptor";
|
import type { EventDescriptor } from "./event-descriptor";
|
||||||
|
|
||||||
export type EventHandler<T> = (event: T) => Promise<void>;
|
export type EventHandler<T> = (event: T) => Promise<void>;
|
||||||
|
|
||||||
export interface IEventBus {
|
export interface IEventBus extends EventBusProtocol {
|
||||||
publish<T>(
|
publish<T>(
|
||||||
descriptor: EventDescriptor<string, z.ZodType<T>>,
|
descriptor: EventDescriptor<string, z.ZodType<T>>,
|
||||||
payload: T,
|
payload: T,
|
||||||
|
|||||||
Reference in New Issue
Block a user