From 4b79fbd3913fbbddbfc48bdea4dbf51f2bd7bee4 Mon Sep 17 00:00:00 2001 From: vinicius Date: Fri, 9 Aug 2024 23:59:12 -0300 Subject: [PATCH] add event off method --- src/utils/emitter.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/emitter.ts b/src/utils/emitter.ts index 15a7e7b..4475ac4 100644 --- a/src/utils/emitter.ts +++ b/src/utils/emitter.ts @@ -15,6 +15,10 @@ export class CacheEmitter { on(event: Event, listener: CacheEvents[Event]) { return this._emitter.on(event, listener) } + + off(event: Event, listener: CacheEvents[Event]) { + return this._emitter.off(event, listener) + } } export class CachePoolEmitter { @@ -31,4 +35,8 @@ export class CachePoolEmitter { on(event: Event, listener: CachePoolEvents[Event]) { return this._emitter.on(event, listener) } + + off(event: Event, listener: CachePoolEvents[Event]) { + return this._emitter.off(event, listener) + } }