Wraps a task with retry functionality.

  • Type Parameters

    • T

    Parameters

    Returns () => Promise<T>

    • A function that, when called, executes the task with retry.