@@ -12,7 +12,10 @@ import {
12
12
RedisClusterType as genericRedisClusterType ,
13
13
RedisSentinelOptions ,
14
14
RedisSentinelType as genericRedisSentinelType ,
15
- createSentinel as genericCreateSentinel
15
+ createSentinel as genericCreateSentinel ,
16
+ createClientPool as genericCreateClientPool ,
17
+ RedisClientPoolType as GenericRedisClientPoolType ,
18
+ RedisPoolOptions ,
16
19
} from '@redis/client' ;
17
20
import RedisBloomModules from '@redis/bloom' ;
18
21
import RedisJSON from '@redis/json' ;
@@ -60,6 +63,23 @@ export function createClient<
60
63
} ) ;
61
64
}
62
65
66
+ export function createClientPool <
67
+ M extends RedisModules ,
68
+ F extends RedisFunctions ,
69
+ S extends RedisScripts ,
70
+ RESP extends RespVersions ,
71
+ TYPE_MAPPING extends TypeMapping = { }
72
+ > ( clientOptions ?: Omit < RedisClientOptions < M , F , S , RESP , TYPE_MAPPING > , "clientSideCache" > ,
73
+ options ?: Partial < RedisPoolOptions > ) : GenericRedisClientPoolType < RedisDefaultModules & M , F , S , RESP , TYPE_MAPPING > {
74
+ return genericCreateClientPool ( {
75
+ ...options ,
76
+ modules : {
77
+ ...modules ,
78
+ ...( clientOptions ?. modules as M )
79
+ }
80
+ } , options ) ;
81
+ }
82
+
63
83
export type RedisClusterType <
64
84
M extends RedisModules = RedisDefaultModules ,
65
85
F extends RedisFunctions = { } ,
0 commit comments