@@ -93,10 +93,10 @@ export class RedisSentinelClient<
93
93
RESP extends RespVersions = 2 ,
94
94
TYPE_MAPPING extends TypeMapping = { }
95
95
> (
96
+ options : RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING > ,
96
97
internal : RedisSentinelInternal < M , F , S , RESP , TYPE_MAPPING > ,
97
98
clientInfo : ClientInfo ,
98
99
commandOptions ?: CommandOptions < TYPE_MAPPING > ,
99
- options ?: RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING >
100
100
) {
101
101
return RedisSentinelClient . factory ( options ) ( internal , clientInfo , commandOptions ) ;
102
102
}
@@ -272,7 +272,7 @@ export default class RedisSentinel<
272
272
273
273
this . #options = options ;
274
274
275
- if ( options ? .commandOptions ) {
275
+ if ( options . commandOptions ) {
276
276
this . #commandOptions = options . commandOptions ;
277
277
}
278
278
@@ -307,7 +307,7 @@ export default class RedisSentinel<
307
307
308
308
Sentinel . prototype . Multi = RedisSentinelMultiCommand . extend ( config ) ;
309
309
310
- return ( options ? : Omit < RedisSentinelOptions , keyof Exclude < typeof config , undefined > > ) => {
310
+ return ( options : Omit < RedisSentinelOptions , keyof Exclude < typeof config , undefined > > ) => {
311
311
// returning a "proxy" to prevent the namespaces.self to leak between "proxies"
312
312
return Object . create ( new Sentinel ( options ) ) as RedisSentinelType < M , F , S , RESP , TYPE_MAPPING > ;
313
313
} ;
@@ -319,7 +319,7 @@ export default class RedisSentinel<
319
319
S extends RedisScripts = { } ,
320
320
RESP extends RespVersions = 2 ,
321
321
TYPE_MAPPING extends TypeMapping = { }
322
- > ( options ? : RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING > ) {
322
+ > ( options : RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING > ) {
323
323
return RedisSentinel . factory ( options ) ( options ) ;
324
324
}
325
325
@@ -409,7 +409,7 @@ export default class RedisSentinel<
409
409
410
410
try {
411
411
return await fn (
412
- RedisSentinelClient . create ( this . _self . #internal , clientInfo , this . _self . #commandOptions , this . _self . #options )
412
+ RedisSentinelClient . create ( this . _self . #options , this . _self . #internal , clientInfo , this . _self . #commandOptions )
413
413
) ;
414
414
} finally {
415
415
const promise = this . _self . #internal. releaseClientLease ( clientInfo ) ;
@@ -510,7 +510,7 @@ export default class RedisSentinel<
510
510
511
511
async aquire ( ) : Promise < RedisSentinelClientType < M , F , S , RESP , TYPE_MAPPING > > {
512
512
const clientInfo = await this . _self . #internal. getClientLease ( ) ;
513
- return RedisSentinelClient . create ( this . _self . #internal , clientInfo , this . _self . #commandOptions , this . _self . #options ) ;
513
+ return RedisSentinelClient . create ( this . _self . #options , this . _self . #internal , clientInfo , this . _self . #commandOptions ) ;
514
514
}
515
515
516
516
getSentinelNode ( ) : RedisNode | undefined {
0 commit comments