function deadlineimport { deadline } from "https://dotland.deno.dev/std@0.181.0/async/deadline.ts"; deadline<T>(p: Promise<T>, delay: number): Promise<T>Create a promise which will be rejected with {@link DeadlineError} when a given delay is exceeded. NOTE: Prefer to use AbortSignal.timeout instead for the APIs accept AbortSignal. ExamplesExample 1 import { deadline } from "https://deno.land/std@0.181.0/async/deadline.ts"; import { delay } from "https://deno.land/std@0.181.0/async/delay.ts"; const delayedPromise = delay(1000); // Below throws `DeadlineError` after 10 ms const result = await deadline(delayedPromise, 10); Type ParametersTParametersp: Promise<T>delay: numberReturnsPromise<T>