@@ -190,14 +190,14 @@ async function timerExample() { |
190 | 190 | timerExample(); |
191 | 191 | ``` |
192 | 192 |
|
193 | | -### `setInterval(callback, delay[, ...args])` |
| 193 | +### `setInterval(callback[, delay[, ...args]])` |
194 | 194 | <!-- YAML |
195 | 195 | added: v0.0.1 |
196 | 196 | --> |
197 | 197 |
|
198 | 198 | * `callback` {Function} The function to call when the timer elapses. |
199 | 199 | * `delay` {number} The number of milliseconds to wait before calling the |
200 | | - `callback`. |
| 200 | + `callback`. **Default**: `1`. |
201 | 201 | * `...args` {any} Optional arguments to pass when the `callback` is called. |
202 | 202 | * Returns: {Timeout} for use with [`clearInterval()`][] |
203 | 203 |
|
@@ -208,14 +208,14 @@ set to `1`. Non-integer delays are truncated to an integer. |
208 | 208 |
|
209 | 209 | If `callback` is not a function, a [`TypeError`][] will be thrown. |
210 | 210 |
|
211 | | -### `setTimeout(callback, delay[, ...args])` |
| 211 | +### `setTimeout(callback[, delay[, ...args]])` |
212 | 212 | <!-- YAML |
213 | 213 | added: v0.0.1 |
214 | 214 | --> |
215 | 215 |
|
216 | 216 | * `callback` {Function} The function to call when the timer elapses. |
217 | 217 | * `delay` {number} The number of milliseconds to wait before calling the |
218 | | - `callback`. |
| 218 | + `callback`. **Default**: `1`. |
219 | 219 | * `...args` {any} Optional arguments to pass when the `callback` is called. |
220 | 220 | * Returns: {Timeout} for use with [`clearTimeout()`][] |
221 | 221 |
|
@@ -332,10 +332,10 @@ that return `Promise` objects. The API is accessible via |
332 | 332 | const timersPromises = require('timers/promises'); |
333 | 333 | ``` |
334 | 334 |
|
335 | | -### `timersPromises.setTimeout(delay\[, value\[, options\]\])` |
| 335 | +### `timersPromises.setTimeout([delay[, value[, options]]])` |
336 | 336 |
|
337 | 337 | * `delay` {number} The number of milliseconds to wait before resolving the |
338 | | - `Promise`. |
| 338 | + `Promise`. **Default**: `1`. |
339 | 339 | * `value` {any} A value with which the `Promise` is resolved. |
340 | 340 | * `options` {Object} |
341 | 341 | * `ref` {boolean} Set to `false` to indicate that the scheduled `Timeout` |
@@ -344,7 +344,7 @@ const timersPromises = require('timers/promises'); |
344 | 344 | * `signal` {AbortSignal} An optional `AbortSignal` that can be used to |
345 | 345 | cancel the scheduled `Timeout`. |
346 | 346 |
|
347 | | -### `timersPromises.setImmediate(\[value\[, options\]\])` |
| 347 | +### `timersPromises.setImmediate([value[, options]])` |
348 | 348 |
|
349 | 349 | * `value` {any} A value with which the `Promise` is resolved. |
350 | 350 | * `options` {Object} |
|