import type { CommandOptions } from "./command"; import { Command } from "./command"; /** * @see https://redis.io/commands/json.mset * @see node_modules/@upstash/redis/docs/commands/json/mset.mdx */ export class JsonMSetCommand< TData extends | number | string | boolean | Record | (number | string | boolean | Record)[], > extends Command<"OK" | null, "OK" | null> { constructor( cmd: { key: string; path: string; value: TData }[], opts?: CommandOptions<"OK" | null, "OK" | null> ) { const command: unknown[] = ["JSON.MSET"]; for (const c of cmd) { command.push(c.key, c.path, c.value); } super(command, opts); } }