Skip to content

Commit

Permalink
fix: parameter declaration of Redis#duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Feb 21, 2022
1 parent 806844a commit 95eaf61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ class Redis extends Commander {
* var anotherRedis = redis.duplicate();
* ```
*/
duplicate(override: RedisOptions) {
return new Redis(Object.assign({}, this.options, override || {}));
duplicate(override?: Partial<RedisOptions>) {
return new Redis({ ...this.options, ...override });
}

recoverFromFatalError(commandError, err: Error | null, options) {
Expand Down

0 comments on commit 95eaf61

Please sign in to comment.