1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

ref #2565 - fix X[AUTO]CLAIM

This commit is contained in:
Leibale
2023-07-20 16:04:51 -04:00
parent 51a1000603
commit 8369448d05
7 changed files with 59 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
import { RedisArgument, Command } from '../RESP/types';
import { transformStreamMessagesReply } from './generic-transformers';
import { RedisArgument, ArrayReply, UnwrapReply, Command } from '../RESP/types';
import { StreamMessageReply, transformStreamMessageReply } from './generic-transformers';
export interface XRangeOptions {
COUNT?: number;
@@ -25,5 +25,7 @@ export default {
FIRST_KEY_INDEX: 1,
IS_READ_ONLY: true,
transformArguments: transformXRangeArguments.bind(undefined, 'XRANGE'),
transformReply: transformStreamMessagesReply
transformReply(reply: UnwrapReply<ArrayReply<StreamMessageReply>>) {
return reply.map(transformStreamMessageReply);
}
} as const satisfies Command;