Skip to content

Commit

Permalink
fix(): change aggregate root geteventhandler method access modifier
Browse files Browse the repository at this point in the history
Changes AggregateRoot's getEventHandler method access modifier from private to protected.
It will allow overwriting getEventHandler method in subclasses.
  • Loading branch information
Patryk Zielinski committed Aug 13, 2020
1 parent eb3900a commit b3b14ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aggregate-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export abstract class AggregateRoot<EventBase extends IEvent = IEvent> {
handler && handler.call(this, event);
}

private getEventHandler<T extends EventBase = EventBase>(
protected getEventHandler<T extends EventBase = EventBase>(
event: T,
): Function | undefined {
const handler = `on${this.getEventName(event)}`;
Expand Down

0 comments on commit b3b14ee

Please sign in to comment.