@grubou/bussy
Version:
Command & query bus implementations
20 lines • 589 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommandResponse = void 0;
class CommandResponse {
constructor(result, events) {
this.result = result;
this.events = events;
}
static withResult(result) {
return new CommandResponse(result, []);
}
static withEvents(events) {
return new CommandResponse(null, events);
}
static with(result, events) {
return new CommandResponse(result, events);
}
}
exports.CommandResponse = CommandResponse;
//# sourceMappingURL=CommandResponse.js.map