Interesting: currently, the retry() function accepts an action parameter, which is a function with promise-constructor-executor-like signature:
// roughly
type Action = <Result>(resolve: Function, reject: Function, retry: Retrier) => Promise<Result>;
// roughly
type Executor = <Result>(resolve: Function, reject: Function) => Promise<Result>;
This means, that it would be backward compatible to provide those params as the second argument of retry(), as in:
const result = await retryable(db.connect, { retryDelay: ... });
… which frankly should've been the first choice of the function signature.
Originally posted by @parzhitsky in #96 (comment)
Interesting: currently, the
retry()function accepts anactionparameter, which is a function with promise-constructor-executor-like signature:This means, that it would be backward compatible to provide those params as the second argument of
retry(), as in:… which frankly should've been the first choice of the function signature.
Originally posted by @parzhitsky in #96 (comment)