You've already forked node-redis
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:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user