delay
Creates a promise that resolves after specified delay
Available since v1.9.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ms | number | Milliseconds to delay |
value | T | Optional value to resolve with (optional) |
Returns
Section titled “Returns”Promise<T> — Promise that resolves after delay
Examples
Section titled “Examples”Wait a specified duration
Section titled “Wait a specified duration”Creates a promise that resolves after the given milliseconds.
Resolve with a value
Section titled “Resolve with a value”Optionally resolves with a provided value.
