Type check RetryStrategyOptions props explicitly

This commit is contained in:
Dani Hodovic
2016-07-28 15:43:52 +02:00
parent 81334e8ad1
commit f18cd14bf9

View File

@@ -30,6 +30,12 @@ client = redis.createClient(num, str, options);
// Test the `retry_strategy` property
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
function retryStrategyNumber(options: redis.RetryStrategyOptions): number {
// Ensure that the properties of RetryStrategyOptions are resilient to breaking change.
// If the properties of the interface changes, the variables below will also need to be adapted.
var error: Error = options.error;
var total_retry_time: number = options.total_retry_time;
var times_connected: number = options.times_connected;
var attempt: number = options.attempt;
return 5000;
}
function retryStrategyError(options: redis.RetryStrategyOptions): Error {