import type { CommandOptions } from "./command"; import { Command } from "./command"; /** * @see https://redis.io/commands/json.arrtrim * @see node_modules/@upstash/redis/docs/commands/json/arrtrim.mdx */ export class JsonArrTrimCommand extends Command<(null | string)[], (null | number)[]> { constructor( cmd: [key: string, path?: string, start?: number, stop?: number], opts?: CommandOptions<(null | string)[], (null | number)[]> ) { const path = cmd[1] ?? "$"; const start = cmd[2] ?? 0; const stop = cmd[3] ?? 0; super(["JSON.ARRTRIM", cmd[0], path, start, stop], opts); } }