diff --git a/src/storages/inRedis/RedisAdapter.ts b/src/storages/inRedis/RedisAdapter.ts index 79ae7470..1c4b3ba7 100644 --- a/src/storages/inRedis/RedisAdapter.ts +++ b/src/storages/inRedis/RedisAdapter.ts @@ -39,7 +39,7 @@ export class RedisAdapter extends ioredis { private _notReadyCommandsQueue?: IRedisCommand[]; private _runningCommands: ISet>; - constructor(log: ILogger, storageSettings?: Record) { + constructor(log: ILogger, storageSettings: Record = {}) { const options = RedisAdapter._defineOptions(storageSettings); // Call the ioredis constructor super(...RedisAdapter._defineLibrarySettings(options)); @@ -103,7 +103,7 @@ export class RedisAdapter extends ioredis { // For handling pending commands on disconnect, add to the set and remove once finished. // On sync commands there's no need, only thenables. instance._runningCommands.add(result); - const cleanUpRunningCommandsCb = () => { + const cleanUpRunningCommandsCb = function () { instance._runningCommands.delete(result); }; // Both success and error remove from queue. @@ -205,7 +205,7 @@ export class RedisAdapter extends ioredis { /** * Parses the options into what we care about. */ - static _defineOptions({ connectionTimeout, operationTimeout, url, host, port, db, pass, tls }: Record = {}) { + static _defineOptions({ connectionTimeout, operationTimeout, url, host, port, db, pass, tls }: Record) { const parsedOptions = { connectionTimeout, operationTimeout, url, host, port, db, pass, tls };