GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: mark optional parameters in timers.md · nodejs/node@368ae95

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • timers.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/timers.md‎

Copy file name to clipboardExpand all lines: doc/api/timers.md
+7-7Lines changed: 7 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ async function timerExample() {
190190
timerExample();
191191
```
192192

193-
### `setInterval(callback, delay[, ...args])`
193+
### `setInterval(callback[, delay[, ...args]])`
194194
<!-- YAML
195195
added: v0.0.1
196196
-->
197197

198198
* `callback` {Function} The function to call when the timer elapses.
199199
* `delay` {number} The number of milliseconds to wait before calling the
200-
`callback`.
200+
`callback`. **Default**: `1`.
201201
* `...args` {any} Optional arguments to pass when the `callback` is called.
202202
* Returns: {Timeout} for use with [`clearInterval()`][]
203203

@@ -208,14 +208,14 @@ set to `1`. Non-integer delays are truncated to an integer.
208208

209209
If `callback` is not a function, a [`TypeError`][] will be thrown.
210210

211-
### `setTimeout(callback, delay[, ...args])`
211+
### `setTimeout(callback[, delay[, ...args]])`
212212
<!-- YAML
213213
added: v0.0.1
214214
-->
215215

216216
* `callback` {Function} The function to call when the timer elapses.
217217
* `delay` {number} The number of milliseconds to wait before calling the
218-
`callback`.
218+
`callback`. **Default**: `1`.
219219
* `...args` {any} Optional arguments to pass when the `callback` is called.
220220
* Returns: {Timeout} for use with [`clearTimeout()`][]
221221

@@ -332,10 +332,10 @@ that return `Promise` objects. The API is accessible via
332332
const timersPromises = require('timers/promises');
333333
```
334334

335-
### `timersPromises.setTimeout(delay\[, value\[, options\]\])`
335+
### `timersPromises.setTimeout([delay[, value[, options]]])`
336336

337337
* `delay` {number} The number of milliseconds to wait before resolving the
338-
`Promise`.
338+
`Promise`. **Default**: `1`.
339339
* `value` {any} A value with which the `Promise` is resolved.
340340
* `options` {Object}
341341
* `ref` {boolean} Set to `false` to indicate that the scheduled `Timeout`
@@ -344,7 +344,7 @@ const timersPromises = require('timers/promises');
344344
* `signal` {AbortSignal} An optional `AbortSignal` that can be used to
345345
cancel the scheduled `Timeout`.
346346

347-
### `timersPromises.setImmediate(\[value\[, options\]\])`
347+
### `timersPromises.setImmediate([value[, options]])`
348348

349349
* `value` {any} A value with which the `Promise` is resolved.
350350
* `options` {Object}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.