1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
This commit is contained in:
Leibale
2023-04-26 13:32:10 -04:00
parent 567ae381b0
commit e25bcff293
151 changed files with 2502 additions and 2504 deletions

View File

@@ -1,16 +1,15 @@
import { RedisCommandArgument, RedisCommandArguments } from '.';
import { RedisArgument, BlobStringReply, NullReply, Command } from '../RESP/types';
import { GeoUnits } from './generic-transformers';
export const FIRST_KEY_INDEX = 1;
export const IS_READ_ONLY = true;
export function transformArguments(
key: RedisCommandArgument,
member1: RedisCommandArgument,
member2: RedisCommandArgument,
export default {
FIRST_KEY_INDEX: 1,
IS_READ_ONLY: true,
transformArguments(
key: RedisArgument,
member1: RedisArgument,
member2: RedisArgument,
unit?: GeoUnits
): RedisCommandArguments {
) {
const args = ['GEODIST', key, member1, member2];
if (unit) {
@@ -18,8 +17,8 @@ export function transformArguments(
}
return args;
}
export function transformReply(reply: RedisCommandArgument | null): number | null {
},
transformReply(reply: BlobStringReply | NullReply) {
return reply === null ? null : Number(reply);
}
}
} as const satisfies Command;