1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
2023-09-05 18:19:31 -04:00

21 lines
517 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 !== undefined) {
args.push(options.path);
}
return args;
},
transformReply: undefined as unknown as () => NumberReply
} as const satisfies Command;