You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
fix: fix various command import issues (#2944)
* fix: fix various command import issues there was some sort of a circular dependency in <module>/lib/commands/index.ts for various modules fixes #2937 fixes #2941 * remove redundant definition
This commit is contained in:
committed by
GitHub
parent
bc4b2101ee
commit
7b737821b2
@@ -1,7 +1,7 @@
|
||||
import { CommandParser } from '@redis/client/dist/lib/client/parser';
|
||||
import { RedisArgument, Command } from '@redis/client/dist/lib/RESP/types';
|
||||
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||
import { transformRedisJsonNullReply } from '.';
|
||||
import { transformRedisJsonNullReply } from './helpers';
|
||||
|
||||
export interface JsonGetOptions {
|
||||
path?: RedisVariadicArgument;
|
||||
@@ -9,12 +9,16 @@ export interface JsonGetOptions {
|
||||
|
||||
export default {
|
||||
IS_READ_ONLY: false,
|
||||
parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonGetOptions) {
|
||||
parseCommand(
|
||||
parser: CommandParser,
|
||||
key: RedisArgument,
|
||||
options?: JsonGetOptions
|
||||
) {
|
||||
parser.push('JSON.GET');
|
||||
parser.pushKey(key);
|
||||
if (options?.path !== undefined) {
|
||||
parser.pushVariadic(options.path)
|
||||
parser.pushVariadic(options.path);
|
||||
}
|
||||
},
|
||||
transformReply: transformRedisJsonNullReply
|
||||
} as const satisfies Command;
|
||||
} as const satisfies Command;
|
Reference in New Issue
Block a user