import type IMiddleware from "./Middleware"; import type { Message } from "./Middleware"; /** * Abstract base class for message buses implementing the middleware pattern. * @typeParam TMessage - The type of message this bus processes (Command or Query) * @typeParam TResponse - The type of response returned by the middleware chain */ export default abstract class MessageBus { protected readonly middlewareChain: (message: TMessage) => Promise; protected constructor(...middlewares: IMiddleware[]); private createChain; private static reverse; }