The delay function creates a promise that will be fulfilled after given time and can be aborted by providing abortSignal.
IMPORT_PATH: "@daiso-tech/core/async"
"@daiso-tech/core/async"
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.
IMPORT_PATH:
"@daiso-tech/core/async"