The work to retry. It gets the attempt number, starting at 1, and can return a value or a promise. An attempt fails when it throws or the promise rejects.
How many attempts to make, how long to wait between them, and when to stop early.
The result of the first attempt that succeeds.
The last attempt's error, once every attempt has failed or shouldRetry returns
false. The signal's reason, if signal aborts. A RangeError, if attempts isn't a
positive integer.
Calls a function until it succeeds, waiting longer between each attempt (exponential backoff).