1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/packages/json/lib/commands/FORGET.ts
Leibale fdd1978d92 WIP
2023-07-18 16:32:45 -04:00

21 lines
503 B
TypeScript

import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
export interface JsonForgetOptions {
path?: RedisArgument;
}
export default {
FIRST_KEY_INDEX: 1,
IS_READ_ONLY: false,
transformArguments(key: RedisArgument, options?: JsonForgetOptions) {
const args = ['JSON.FORGET', key];
if (options?.path) {
args.push(options.path);
}
return args;
},
transformReply: undefined as unknown as () => NumberReply
} as const satisfies Command;