import { after } from "https://deno.land/x/ayonli_jsext@v0.9.72/async.ts";
Resolves a promise only after the given duration.
Examples
Example 1
Example 1
import { after } from "@ayonli/jsext/async";
const task = fetch("https://example.com")
const res = await after(task, 1000);
console.log(res); // the response will not be printed unless 1 second has passed
Parameters
task: PromiseLike<T>