Skip to main content
Module

x/timeout/timeout.ts>race

Abortable promise timeout for Deno
Latest
function race
import { race } from "https://deno.land/x/timeout@2.4/timeout.ts";

Shortcut for racing the given promises with a timeout that rejects whith TimeoutError when timed out

Parameters

promises: Promise<T>[]

Promises to race with the timeout

delay: number

Milliseconds to wait