NodeRedis/node-redis

View on GitHub
packages/client/lib/commands/LSET.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { CommandParser } from '../client/parser';
import { RedisArgument, SimpleStringReply, Command } from '../RESP/types';

export default {
  IS_READ_ONLY: true,
  parseCommand(parser: CommandParser, key: RedisArgument, index: number, element: RedisArgument) {
    parser.push('LSET');
    parser.pushKey(key);
    parser.push(index.toString(), element);
  },
  transformReply: undefined as unknown as () => SimpleStringReply<'OK'>
} as const satisfies Command;