Skip to content

Commit

Permalink
doc: mark optional parameters in timers.md
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vsemozhetbyt authored and BethGriggs committed Dec 15, 2020
1 parent d1fd3f2 commit 62bf1a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/timers.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ async function timerExample() {
timerExample();
```

### `setInterval(callback, delay[, ...args])`
### `setInterval(callback[, delay[, ...args]])`
<!-- YAML
added: v0.0.1
-->

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

Expand All @@ -206,14 +206,14 @@ set to `1`. Non-integer delays are truncated to an integer.

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

### `setTimeout(callback, delay[, ...args])`
### `setTimeout(callback[, delay[, ...args]])`
<!-- YAML
added: v0.0.1
-->

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

Expand Down

0 comments on commit 62bf1a6

Please sign in to comment.