@mikuroxina/mini-fn
    Preparing search index...

    Function exponentialBackoff

    • Creates a retriable optical by exponential backoff method. It increases the delay duration (100 milliseconds) multiplied by the power of two, but its exponent stops at 23.

      Parameters

      • maxRetries: number

        Maximum retry counts.

      • waiter: (milliseconds: number) => Promise<void> = ...

        The waiter function to delay. Defaults to setTimeout method.

      Returns <E, T>(
          fallback: (err: E) => T,
      ) => <S, A>(
          triable: (data: S) => (state: number) => Promise<Result.Result<E, A>>,
      ) => <B>(
          set: (data: S) => (modified: B) => T,
      ) => Optical.Optical<PromiseHkt, S, T, A, B>

      The retriable optical.