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

fix multi "generic" type, some docs

This commit is contained in:
Leibale
2023-11-20 13:15:40 -05:00
parent 3ca33b8b80
commit 520441704b
4 changed files with 66 additions and 13 deletions

View File

@@ -1,6 +1,5 @@
import { CommandArguments, RedisScript, TransformReply } from './RESP/types';
import { CommandArguments, RedisScript, ReplyUnion, TransformReply } from './RESP/types';
// TODO: enum?
export type MULTI_REPLY = {
GENERIC: 'generic';
TYPED: 'typed';
@@ -8,7 +7,7 @@ export type MULTI_REPLY = {
export type MultiReply = MULTI_REPLY[keyof MULTI_REPLY];
export type MultiReplyType<T extends MultiReply, REPLIES> = T extends MULTI_REPLY['TYPED'] ? REPLIES : Array<unknown>;
export type MultiReplyType<T extends MultiReply, REPLIES> = T extends MULTI_REPLY['TYPED'] ? REPLIES : Array<ReplyUnion>;
export interface RedisMultiQueuedCommand {
args: CommandArguments;