From 55f0b2c98f8675c7b70eea49728ab49aff4736f9 Mon Sep 17 00:00:00 2001 From: beefchimi Date: Tue, 31 Oct 2023 13:50:49 -0400 Subject: [PATCH] :recycle: [EmittenProtected] Mark private members as readonly --- src/EmittenProtected.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EmittenProtected.ts b/src/EmittenProtected.ts index e754275..5460762 100644 --- a/src/EmittenProtected.ts +++ b/src/EmittenProtected.ts @@ -1,8 +1,8 @@ import type {EmittenMap, EmittenLibrary} from './types'; export class EmittenProtected { - #multiLibrary: EmittenLibrary = new Map(); - #singleLibrary: EmittenLibrary = new Map(); + readonly #multiLibrary: EmittenLibrary = new Map(); + readonly #singleLibrary: EmittenLibrary = new Map(); protected get activeEvents() { // This redundant getter + method are required @@ -74,7 +74,7 @@ export class EmittenProtected { this.#every(this.#singleLibrary); } - #every = (library: EmittenLibrary) => { + readonly #every = (library: EmittenLibrary) => { library.forEach((collection, eventName) => { collection.forEach((listener) => { this.off(eventName, listener);