Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Backoff

import type { Backoff } from "https://gitlab.com/soapbox-pub/nostr-machina/-/raw/main/mod.ts";

Function that calculates the wait time between reconnection attempts.

type Backoff = (
attempt: number,
delay: number,
random?: Math.random,
) => number
;

§Type

§
(attempt: number, delay: number, random?: Math.random) => number
[src]