multi-command.d.ts 946 B

12345678910111213141516
  1. import { RedisCommand, RedisCommandArguments, RedisCommandRawReply, RedisFunction, RedisScript } from './commands';
  2. import { ErrorReply } from './errors';
  3. export interface RedisMultiQueuedCommand {
  4. args: RedisCommandArguments;
  5. transformReply?: RedisCommand['transformReply'];
  6. }
  7. export default class RedisMultiCommand {
  8. static generateChainId(): symbol;
  9. readonly queue: Array<RedisMultiQueuedCommand>;
  10. readonly scriptsInUse: Set<string>;
  11. addCommand(args: RedisCommandArguments, transformReply?: RedisCommand['transformReply']): void;
  12. addFunction(name: string, fn: RedisFunction, args: Array<unknown>): RedisCommandArguments;
  13. addScript(script: RedisScript, args: Array<unknown>): RedisCommandArguments;
  14. handleExecReplies(rawReplies: Array<RedisCommandRawReply | ErrorReply>): Array<RedisCommandRawReply>;
  15. transformReplies(rawReplies: Array<RedisCommandRawReply | ErrorReply>): Array<RedisCommandRawReply>;
  16. }