From a8f77d5015d2dae3dfcb3eb124a1e27bf41c1a2f Mon Sep 17 00:00:00 2001 From: leibale Date: Fri, 14 May 2021 05:04:44 -0400 Subject: [PATCH] missing file from commit 61edd4f1b5436640cadb842f783edce36b07aa80 --- lib/client.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/client.ts b/lib/client.ts index 09a50452d1..92e82578d3 100644 --- a/lib/client.ts +++ b/lib/client.ts @@ -21,11 +21,7 @@ type WithModules> = { [P in keyof M[number]]: RedisCommandSignature; }; -type WithMulti> = { - multi(): RedisMultiCommandType -}; - -export type RedisClientType = WithCommands & WithModules & WithMulti & RedisClient; +export type RedisClientType = WithCommands & WithModules & RedisClient; export default class RedisClient extends EventEmitter { static defineCommand(on: any, name: string, command: RedisCommand): void { @@ -37,7 +33,7 @@ export default class RedisClient extends } static create(options?: RedisClientOptions): RedisClientType { - return new RedisClient(options); + return new RedisClient(options); } readonly #socket: RedisSocket; @@ -84,13 +80,14 @@ export default class RedisClient extends const executor = async (commands: Array): Promise> => { const promise = Promise.all( commands.map(({encodedCommand}) => { - return this.#queue.addEncodedCommand(encodedCommand); + return this.#queue.addEncodedCommand(encodedCommand); }) ); this.#tick(); - return promise; + const replies = await promise; + return (replies[replies.length - 1] as Array); }; const modules = this.#modules;