Skip to content

Commit 0f188a4

Browse files
authored
make cluster.connect() return this
1 parent c1fc0fe commit 0f188a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/client/lib/cluster/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,9 @@ export default class RedisCluster<
375375
}) as RedisClusterType<_M, _F, _S, _RESP, _TYPE_MAPPING>;
376376
}
377377

378-
connect() {
379-
return this._self.#slots.connect();
378+
async connect() {
379+
await this._self.#slots.connect();
380+
return this as unknown as RedisClusterType<M, F, S, RESP, TYPE_MAPPING>;
380381
}
381382

382383
withCommandOptions<

0 commit comments

Comments
 (0)