1
0
mirror of https://github.com/redis/node-redis.git synced 2025-12-12 21:21:15 +03:00

fix: add typed/untyped mode support for multi-commands (#3084)

This commit is contained in:
Pavel Pashov
2025-10-01 16:33:22 +03:00
committed by GitHub
parent 3d55ec4bc2
commit e588eab249
4 changed files with 30 additions and 8 deletions

View File

@@ -6,6 +6,13 @@ export type MULTI_REPLY = {
TYPED: 'typed';
};
export type MULTI_MODE = {
TYPED: 'typed';
UNTYPED: 'untyped';
};
export type MultiMode = MULTI_MODE[keyof MULTI_MODE];
export type MultiReply = MULTI_REPLY[keyof MULTI_REPLY];
export type MultiReplyType<T extends MultiReply, REPLIES> = T extends MULTI_REPLY['TYPED'] ? REPLIES : Array<ReplyUnion>;