1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

add cluster.duplicate, add some tests

This commit is contained in:
leibale
2021-09-09 16:58:31 -04:00
parent 18ad329ccc
commit 1413a69a6b
5 changed files with 58 additions and 9 deletions

View File

@@ -91,6 +91,10 @@ export default class RedisCluster<M extends RedisModules = RedisModules, S exten
this.#Multi = RedisMultiCommand.extend(options);
}
duplicate(): RedisClusterOptions<M, S> {
return new (Object.getPrototypeOf(this).constructor)(this.#options);
}
async connect(): Promise<void> {
return this.#slots.connect();
}