神岛 API 文档 - ArenaPro版
    Preparing search index...
    • import {
      setTimeout,
      } from 'node:timers/promises';

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

      console.log(res); // Prints 'result'

      Type Parameters

      • T = void

      Parameters

      • Optionaldelay: number

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

      • Optionalvalue: T

        A value with which the promise is fulfilled.

      • Optionaloptions: TimerOptions

      Returns Promise<T>

      v15.0.0