1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/json/lib/commands/DEBUG_MEMORY.ts
2023-09-05 18:19:31 -04:00

21 lines
548 B
TypeScript

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