firefly-limiter - v1.0.1
    Preparing search index...

    Type Alias Backoff

    Backoff: (attempt: number, error?: unknown) => number

    How long to wait after the attempt numbered attempt failed.

    The failure is passed as well, so a schedule can read something the error carries rather than only counting attempts. The schedules here ignore it, and a bespoke one is a closure of your own.

    Type Declaration

      • (attempt: number, error?: unknown): number
      • Parameters

        • attempt: number
        • Optionalerror: unknown

        Returns number