From daa90799b34a4de1a4ef14073569ed2085d19051 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Tue, 5 Jul 2022 08:52:30 -0700 Subject: [PATCH] Reintroduce `getMany` optional method (#384) * Revert "Revert "Add missing `getMany` optional method on Store interface (#362)" (#365)" This reverts commit da05c2ffec9c2772eb081a159629a066a435e1ca. * null | undefined * no null type --- packages/keyv/src/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/keyv/src/index.d.ts b/packages/keyv/src/index.d.ts index bd568b4ff..99cf30047 100644 --- a/packages/keyv/src/index.d.ts +++ b/packages/keyv/src/index.d.ts @@ -92,12 +92,17 @@ declare namespace Keyv { value: Value; expires: number | undefined; } + type StoredData = DeserializedData | string | undefined; + interface Store { get(key: string): Value | Promise | undefined; set(key: string, value: Value, ttl?: number): any; delete(key: string): boolean | Promise; clear(): void | Promise; has?(key: string): boolean | Promise; + getMany?( + keys: string[] + ): Array> | Promise>> | undefined; } }