@lucid-softworks/delay
v0.1.0
Published
Wait for a duration with optional AbortSignal cancellation.
Downloads
159
Maintainers
Readme
@lucid-softworks/delay
Wait for a non-negative duration, with optional AbortSignal cancellation.
import { delay } from "@lucid-softworks/delay";
await delay(250, { signal: controller.signal });If cancellation has no platform-provided reason, the promise rejects with a
DelayAbortError. Invalid durations throw synchronously.
