From f61e27785edad81321b2f3c020809dae9220dfaa Mon Sep 17 00:00:00 2001 From: Trung Dang Date: Mon, 19 Feb 2018 00:23:33 +0700 Subject: [PATCH] update missing ioredis/onPossiblyUnhandledRejection --- types/ioredis/index.d.ts | 1 + types/ioredis/ioredis-tests.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index de71a9f083..6834121851 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -48,6 +48,7 @@ declare namespace IORedis { } interface Redis extends NodeJS.EventEmitter, Commander { + Promise: typeof Promise; status: string; connect(callback?: () => void): Promise; disconnect(): void; diff --git a/types/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts index d8106ecdea..e8e32062dc 100644 --- a/types/ioredis/ioredis-tests.ts +++ b/types/ioredis/ioredis-tests.ts @@ -105,7 +105,10 @@ redis.multi([ // results = [[null, 'OK'], [null, 'bar']] }); -const keys = [ 'foo', 'bar' ]; +redis.Promise.onPossiblyUnhandledRejection((error) => { +}); + +const keys = ['foo', 'bar']; redis.mget(...keys); new Redis.Cluster([