From cadc6f11fd0983bdedbea9d863b1137cb617d8c9 Mon Sep 17 00:00:00 2001 From: "Matt R. Wilson" Date: Tue, 19 Feb 2019 16:23:30 -0700 Subject: [PATCH] [catbox] Update Client.stop to return a promise. The method is define as async. https://github.com/hapijs/catbox/blob/9e474ea17444285c2e82c2b2996d9eced6784f9a/lib/client.js#L40-L43 --- types/catbox/catbox-tests.ts | 3 +++ types/catbox/index.d.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/catbox/catbox-tests.ts b/types/catbox/catbox-tests.ts index e86d2a94af..af85cde068 100644 --- a/types/catbox/catbox-tests.ts +++ b/types/catbox/catbox-tests.ts @@ -18,6 +18,9 @@ const Memory: EnginePrototypeOrObject = { const client = new Client(Memory, { partition: 'cache' }); +client.start().then(() => {}); +client.stop().then(() => {}); + const cache = new Policy({ expiresIn: 5000, }, client, 'cache'); diff --git a/types/catbox/index.d.ts b/types/catbox/index.d.ts index bd41889e07..e90768be20 100644 --- a/types/catbox/index.d.ts +++ b/types/catbox/index.d.ts @@ -23,7 +23,7 @@ export class Client implements ClientApi { /** start() - creates a connection to the cache server. Must be called before any other method is available. */ start(): Promise; /** stop() - terminates the connection to the cache server. */ - stop(): void; + stop(): Promise; /** * get(key, callback) - retrieve an item from the cache engine if found where: * * key - a cache key object (see [ICacheKey]).