Skip to content

Commit 5021cf0

Browse files
committed
tidy re-emitter
1 parent dc36e68 commit 5021cf0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/ReEmitter.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,9 @@ limitations under the License.
1919
import { EventEmitter } from "events";
2020

2121
export class ReEmitter {
22-
private target: EventEmitter;
22+
constructor(private readonly target: EventEmitter) {}
2323

24-
constructor(target: EventEmitter) {
25-
this.target = target;
26-
}
27-
28-
reEmit(source: EventEmitter, eventNames: string[]) {
24+
public reEmit(source: EventEmitter, eventNames: string[]): void {
2925
for (const eventName of eventNames) {
3026
// We include the source as the last argument for event handlers which may need it,
3127
// such as read receipt listeners on the client class which won't have the context

0 commit comments

Comments
 (0)