Skip to content

Commit

Permalink
chore: simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Sep 12, 2024
1 parent 8432069 commit cb4f1c9
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
export class BaseQueueEventsBus {
protected readonly subscribers: Record<string, any>;

public constructor() {
this.subscribers = {};
}
protected readonly subscribers: Record<string, any> = {};

public subscribe(id, callback) {
this.subscribers[id] = { id, callback };
}

public unsubscribe(id) {
delete this.subscribers[id];
}
Expand Down

0 comments on commit cb4f1c9

Please sign in to comment.