Skip to content

Commit a29d9c4

Browse files
committedMar 14, 2022
fix: parameter declaration of Redis#duplicate
1 parent fa4495f commit a29d9c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/Redis.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ class Redis extends Commander {
355355
* var anotherRedis = redis.duplicate();
356356
* ```
357357
*/
358-
duplicate(override: RedisOptions) {
359-
return new Redis(Object.assign({}, this.options, override || {}));
358+
duplicate(override?: Partial<RedisOptions>) {
359+
return new Redis({ ...this.options, ...override });
360360
}
361361

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

0 commit comments

Comments
 (0)
Please sign in to comment.