The return type of the async function.
The async function to retry.
Maximum number of retry attempts. Default is 3.
Delay between retries in milliseconds. Default is 500ms.
A promise that resolves with the result of the function, or rejects after all retries fail.
This utility is useful for handling transient errors in asynchronous operations, such as network requests or database queries, where a retry might succeed after a failure.
Retries a promise-returning function a specified number of times with delay between attempts.