Skip to main content
Module

x/retry/wait/wait.ts>waitUntil

Re-execute a function until it does not throw an error or execute a function with a timeout.
Very Popular
Latest
function waitUntil
import { waitUntil } from "https://deno.land/x/retry@v2.0.0/wait/wait.ts";

wait for a function to complete within a givne duration or throw an exception.

Parameters

fn: () => T

the function to execute

optional
duration: number

timeout in milliseconds

optional
error: Error

Returns

Promise<T>