@kerthin/domain
Version:
Kerthin Domain (based on DDD)
23 lines • 513 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DomainEvent = void 0;
class DomainEvent {
constructor() {
this.events = [];
}
addEvent(event) {
this.events.push(event);
}
getEvents() {
return this.events;
}
clearEvents() {
this.events = [];
}
dispatch() {
console.log('emit all events!');
this.clearEvents();
}
}
exports.DomainEvent = DomainEvent;
//# sourceMappingURL=domain-event.js.map