From 69737ccec98aee79eb16ecd63b74a80ae366a6ed Mon Sep 17 00:00:00 2001 From: Piotr Roszatycki Date: Sat, 14 Oct 2017 00:11:17 +0200 Subject: [PATCH] ioredis: showFriendlyErrorStack option (#20459) --- types/ioredis/index.d.ts | 4 ++++ types/ioredis/ioredis-tests.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index 39904b8b53..7a36c4b7a6 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -711,6 +711,10 @@ declare module IORedis { * If you are using the hiredis parser, it's highly recommended to enable this option. Create another instance with dropBufferSupport disabled for other commands that you want to return binary instead of string: */ dropBufferSupport?: boolean; + /** + * Whether to show a friendly error stack. Will decrease the performance significantly. + */ + showFriendlyErrorStack?: boolean; } interface ScanStreamOption { diff --git a/types/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts index 9fbd9ec1bd..373fba52c5 100644 --- a/types/ioredis/ioredis-tests.ts +++ b/types/ioredis/ioredis-tests.ts @@ -30,7 +30,8 @@ new Redis({ family: 4, // 4 (IPv4) or 6 (IPv6) password: 'auth', db: 0, - retryStrategy: function() { return false; } + retryStrategy: function() { return false; }, + showFriendlyErrorStack: true }) var pub = new Redis();