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);