/** * Function for running a function until it completes successfully * with an optional delay between runs that gets progressively longer. * * Special Thanks to @MyBuilderTech * @see https://tech.mybuilder.com/handling-retries-and-back-off-attempts-with-javascript-promises/ */ export default function backoff(retries: number, fn: () => any, delay?: number): Promise;