Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 368ae95

Browse filesBrowse files
vsemozhetbyttargos
authored andcommitted
doc: mark optional parameters in timers.md
PR-URL: #35764 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 70c41a8 commit 368ae95
Copy full SHA for 368ae95

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.