Skip to content

Commit

Permalink
refactor: make deleteInMemoryBlockedKeys method optional
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Feb 7, 2024
1 parent 49489e5 commit b7df37b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/limiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class Limiter implements LimiterStoreContract {
* Delete all keys blocked within the memory
*/
deleteInMemoryBlockedKeys(): void {
return this.#store.deleteInMemoryBlockedKeys()
return this.#store.deleteInMemoryBlockedKeys?.()
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export interface LimiterStoreContract {
/**
* Delete all keys blocked within the memory
*/
deleteInMemoryBlockedKeys(): void
deleteInMemoryBlockedKeys?(): void

/**
* Clear the storage database
Expand Down

0 comments on commit b7df37b

Please sign in to comment.