Function retry

Execute a function until it succeeds. Limit the retries, wait between retries, control when to stop trying early.

  • Type Parameters

    • T

    Parameters

    • fn: () => Promise<T>

      The function to execute.

    • Optionaloptions: Options

      Options controlling the behavior of the function.

    Returns Promise<T>