1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
Leibale
2023-06-19 18:04:31 -04:00
parent 9c1f2a0f86
commit f150e86f95
47 changed files with 2490 additions and 1798 deletions

View File

@@ -1,22 +1,22 @@
// import { RedisCommandArguments } from '.';
import { RedisArgument, CommandArguments, BlobStringReply, Command } from '../RESP/types';
// interface FunctionLoadOptions {
// REPLACE?: boolean;
// }
export interface FunctionLoadOptions {
REPLACE?: boolean;
}
// export function transformArguments(
// code: string,
// options?: FunctionLoadOptions
// ): RedisCommandArguments {
// const args = ['FUNCTION', 'LOAD'];
export default {
FIRST_KEY_INDEX: undefined,
IS_READ_ONLY: false,
transformArguments(code: RedisArgument, options?: FunctionLoadOptions) {
const args: CommandArguments = ['FUNCTION', 'LOAD'];
// if (options?.REPLACE) {
// args.push('REPLACE');
// }
if (options?.REPLACE) {
args.push('REPLACE');
}
// args.push(code);
args.push(code);
// return args;
// }
// export declare function transformReply(): string;
return args;
},
transformReply: undefined as unknown as () => BlobStringReply
} as const satisfies Command;