Skip to main content
setImmediate - node__timers--promises.d.ts - Node documentation
function setImmediate

Usage in Deno

```typescript import { setImmediate } from "node:node__timers--promises.d.ts"; ```
setImmediate<T = void>(
value?: T,
options?: TimerOptions,
): Promise<T>
```js import { setImmediate, } from 'node:timers/promises'; const res = await setImmediate('result'); console.log(res); // Prints 'result' ```

Type Parameters

T = void

Parameters

optional
value: T
A value with which the promise is fulfilled.
optional
options: TimerOptions

Return Type

Promise<T>