From bae6bfef80cd844214c015b61a8a0b556009ecc7 Mon Sep 17 00:00:00 2001 From: Nour Alharithi Date: Tue, 3 Dec 2024 14:46:18 -0800 Subject: [PATCH] fix return types --- src/index.ts | 2 +- src/utils/utils.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index a4c9fd6..07826e4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -305,7 +305,7 @@ const main = async (): Promise => { const fetchFromRedis = async ( key: string, selectionCriteria: (responses: any) => any - ): Promise => { + ): Promise => { const redisResponses = await Promise.all( redisClients.map((client) => client.getRaw(key)) ); diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 2d9dd5e..7aa2ab8 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -473,7 +473,12 @@ export type SubscriberLookup = { }; }; -export const selectMostRecentBySlot = (responses: any[]): any => { +export const selectMostRecentBySlot = ( + responses: any[] +): { + slot: number; + [key: string]: any; +} => { const parsedResponses = responses .map((response) => { try {