The delay function creates a promise that will be fulfilled after given time and can be aborted by providing abortSignal.
AsyncError
AbortAsyncError
import { delay, TimeSpan } from "@daiso-tech/core";(async () => { console.log("a"); await delay(TimeSpan.fromSeconds(2)); console.log("b"); Copy
import { delay, TimeSpan } from "@daiso-tech/core";(async () => { console.log("a"); await delay(TimeSpan.fromSeconds(2)); console.log("b");
The delay function creates a promise that will be fulfilled after given time and can be aborted by providing abortSignal.