mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Fix return type for RedisOptions.reconnectOnError
As seen in the source https://github.com/luin/ioredis/blob/cf18554c142f461b3ad7ff716df596d7d1615828/lib/redis/parser.js#L50 the return values for the `reconnectOnError` functions should include `1` and `2`.
This commit is contained in:
Vendored
+5
-1
@@ -798,7 +798,11 @@ declare namespace IORedis {
|
||||
* Fixed in: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/15858
|
||||
*/
|
||||
retryStrategy?(times: number): number | false;
|
||||
reconnectOnError?(error: Error): boolean;
|
||||
/**
|
||||
* 1/true means reconnect, 2 means reconnect and resend failed command. Returning false will ignore
|
||||
* the error and do nothing.
|
||||
*/
|
||||
reconnectOnError?(error: Error): boolean | 1 | 2;
|
||||
/**
|
||||
* By default, if there is no active connection to the Redis server, commands are added to a queue
|
||||
* and are executed once the connection is "ready" (when enableReadyCheck is true, "ready" means
|
||||
|
||||
Reference in New Issue
Block a user