UNPKG

@kerthin/domain

Version:
23 lines 513 B
"use strict"; 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