@grubou/bussy
Version:
Command & query bus implementations
10 lines (9 loc) • 498 B
TypeScript
import { DomainEvent } from '../../eventBus/types/DomainEvent';
export declare class CommandResponse<RESULT> {
result: RESULT;
events: ReadonlyArray<DomainEvent>;
private constructor();
static withResult<RESULT>(result: RESULT): CommandResponse<RESULT>;
static withEvents<EVENT extends DomainEvent>(events: ReadonlyArray<EVENT>): CommandResponse<null>;
static with<RESULT, EVENT extends DomainEvent>(result: RESULT, events: ReadonlyArray<EVENT>): CommandResponse<RESULT>;
}