FsetTimeout
Bun

function

timers.promises.setTimeout

function setTimeout<T = void>(
delay?: number,
value?: T,
options?: TimerOptions
): Promise<T>;
import {
  setTimeout,
} from 'node:timers/promises';

const res = await setTimeout(100, 'result');

console.log(res);  // Prints 'result'
@param delay

The number of milliseconds to wait before fulfilling the promise. Default: 1.

@param value

A value with which the promise is fulfilled.