You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
convert "resp types" to interfaces to allow circular references
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { RedisArgument, Command, NullReply, TuplesReply, BlobStringReply, DoubleReply } from '../RESP/types';
|
||||
import { RedisArgument, NullReply, TuplesReply, BlobStringReply, DoubleReply, UnwrapReply, Command } from '../RESP/types';
|
||||
import { RedisVariadicArgument, pushVariadicArguments } from './generic-transformers';
|
||||
|
||||
export function transformBZPopArguments(
|
||||
@@ -20,14 +20,14 @@ export default {
|
||||
return transformBZPopArguments('BZPOPMAX', ...args);
|
||||
},
|
||||
transformReply: {
|
||||
2: (reply: NullReply | TuplesReply<[BlobStringReply, BlobStringReply, BlobStringReply]>) => {
|
||||
2(reply: UnwrapReply<NullReply | TuplesReply<[BlobStringReply, BlobStringReply, BlobStringReply]>>) {
|
||||
return reply === null ? null : {
|
||||
key: reply[0],
|
||||
value: reply[1],
|
||||
score: Number(reply[2])
|
||||
};
|
||||
},
|
||||
3: (reply: NullReply | TuplesReply<[BlobStringReply, BlobStringReply, DoubleReply]>) => {
|
||||
3(reply: UnwrapReply<NullReply | TuplesReply<[BlobStringReply, BlobStringReply, DoubleReply]>>) {
|
||||
return reply === null ? null : {
|
||||
key: reply[0],
|
||||
value: reply[1],
|
||||
|
Reference in New Issue
Block a user