Module

std/async/mod.ts>deadline

Deno standard library
Go to Latest
function deadline
import { deadline } from "https://dotland.deno.dev/std@0.131.0/async/mod.ts";

Create a promise which will be rejected with DeadlineError when a given delay is exceeded.

Parameters

p: Promise<T>
delay: number

Returns

Promise<T>