@@ -93,10 +93,10 @@ export class RedisSentinelClient<
9393 RESP extends RespVersions = 2 ,
9494 TYPE_MAPPING extends TypeMapping = { }
9595 > (
96+ options : RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING > ,
9697 internal : RedisSentinelInternal < M , F , S , RESP , TYPE_MAPPING > ,
9798 clientInfo : ClientInfo ,
9899 commandOptions ?: CommandOptions < TYPE_MAPPING > ,
99- options ?: RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING >
100100 ) {
101101 return RedisSentinelClient . factory ( options ) ( internal , clientInfo , commandOptions ) ;
102102 }
@@ -272,7 +272,7 @@ export default class RedisSentinel<
272272
273273 this . #options = options ;
274274
275- if ( options ? .commandOptions ) {
275+ if ( options . commandOptions ) {
276276 this . #commandOptions = options . commandOptions ;
277277 }
278278
@@ -307,7 +307,7 @@ export default class RedisSentinel<
307307
308308 Sentinel . prototype . Multi = RedisSentinelMultiCommand . extend ( config ) ;
309309
310- return ( options ? : Omit < RedisSentinelOptions , keyof Exclude < typeof config , undefined > > ) => {
310+ return ( options : Omit < RedisSentinelOptions , keyof Exclude < typeof config , undefined > > ) => {
311311 // returning a "proxy" to prevent the namespaces.self to leak between "proxies"
312312 return Object . create ( new Sentinel ( options ) ) as RedisSentinelType < M , F , S , RESP , TYPE_MAPPING > ;
313313 } ;
@@ -319,7 +319,7 @@ export default class RedisSentinel<
319319 S extends RedisScripts = { } ,
320320 RESP extends RespVersions = 2 ,
321321 TYPE_MAPPING extends TypeMapping = { }
322- > ( options ? : RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING > ) {
322+ > ( options : RedisSentinelOptions < M , F , S , RESP , TYPE_MAPPING > ) {
323323 return RedisSentinel . factory ( options ) ( options ) ;
324324 }
325325
@@ -409,7 +409,7 @@ export default class RedisSentinel<
409409
410410 try {
411411 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 )
413413 ) ;
414414 } finally {
415415 const promise = this . _self . #internal. releaseClientLease ( clientInfo ) ;
@@ -510,7 +510,7 @@ export default class RedisSentinel<
510510
511511 async aquire ( ) : Promise < RedisSentinelClientType < M , F , S , RESP , TYPE_MAPPING > > {
512512 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 ) ;
514514 }
515515
516516 getSentinelNode ( ) : RedisNode | undefined {
0 commit comments