import { Query } from '../../classes/query'; import { AsyncContext } from '../../scopes/async.context'; import { IQuery } from './query.interface'; /** * Represents a query bus. * * @publicApi */ export interface IQueryBus { /** * Executes a query. * @param query The query to execute. */ execute(query: Query): Promise; /** * Executes a query. * @param query The query to execute. */ execute(query: T): Promise; /** * Executes a query. * @param query The query to execute. */ execute(query: Query, asyncContext: AsyncContext): Promise; /** * Executes a query. * @param query The query to execute. */ execute(query: T, asyncContext: AsyncContext): Promise; }