11import { SinglyLinkedList , DoublyLinkedNode , DoublyLinkedList } from './linked-list' ;
22import encodeCommand from '../RESP/encoder' ;
33import { Decoder , PUSH_TYPE_MAPPING , RESP_TYPES } from '../RESP/decoder' ;
4- import { CommandArguments , TypeMapping , ReplyUnion , RespVersions } from '../RESP/types' ;
4+ import { TypeMapping , ReplyUnion , RespVersions , RedisArgument } from '../RESP/types' ;
55import { ChannelListeners , PubSub , PubSubCommand , PubSubListener , PubSubType , PubSubTypeListeners } from './pub-sub' ;
66import { AbortError , ErrorReply } from '../errors' ;
77import { MonitorCallback } from '.' ;
@@ -17,7 +17,7 @@ export interface CommandOptions<T = TypeMapping> {
1717}
1818
1919export interface CommandToWrite extends CommandWaitingForReply {
20- args : CommandArguments ;
20+ args : ReadonlyArray < RedisArgument > ;
2121 chainId : symbol | undefined ;
2222 abort : {
2323 signal : AbortSignal ;
@@ -117,7 +117,7 @@ export default class RedisCommandsQueue {
117117 }
118118
119119 addCommand < T > (
120- args : CommandArguments ,
120+ args : ReadonlyArray < RedisArgument > ,
121121 options ?: CommandOptions
122122 ) : Promise < T > {
123123 if ( this . #maxLength && this . #toWrite. length + this . #waitingForReply. length >= this . #maxLength) {
@@ -346,7 +346,7 @@ export default class RedisCommandsQueue {
346346 * commandsToWrite ( ) {
347347 let toSend = this . #toWrite. shift ( ) ;
348348 while ( toSend ) {
349- let encoded : CommandArguments ;
349+ let encoded : ReadonlyArray < RedisArgument >
350350 try {
351351 encoded = encodeCommand ( toSend . args ) ;
352352 } catch ( err ) {
0 commit comments