Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2016-08-30 08:35:03 +0300
committerLuigi Pinca <luigipinca@gmail.com>2016-09-14 09:08:28 +0300
commite1ddcb7219c8900473ecc343db2db86984d1688d (patch)
tree7a14f2e7bcfa77232b06c772772ba0d2c34bc818 /doc/api/timers.md
parentad1a9dd35a7d0490f2993a4559d2616f8c4f4c7e (diff)
doc: standardize rest parameters
PR-URL: https://github.com/nodejs/node/pull/8485 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/timers.md')
-rw-r--r--doc/api/timers.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/api/timers.md b/doc/api/timers.md
index e356d2d672d..b833e06d6e3 100644
--- a/doc/api/timers.md
+++ b/doc/api/timers.md
@@ -65,14 +65,14 @@ a certain period of time. When a timer's function is called varies depending on
which method was used to create the timer and what other work the Node.js
event loop is doing.
-### setImmediate(callback[, ...arg])
+### setImmediate(callback[, ...args])
<!-- YAML
added: v0.9.1
-->
* `callback` {Function} The function to call at the end of this turn of
[the Node.js Event Loop]
-* `[, ...arg]` Optional arguments to pass when the `callback` is called.
+* `...args` {any} Optional arguments to pass when the `callback` is called.
Schedules the "immediate" execution of the `callback` after I/O events'
callbacks and before timers created using [`setTimeout()`][] and
@@ -87,7 +87,7 @@ next event loop iteration.
If `callback` is not a function, a [`TypeError`][] will be thrown.
-### setInterval(callback, delay[, ...arg])
+### setInterval(callback, delay[, ...args])
<!-- YAML
added: v0.0.1
-->
@@ -95,7 +95,7 @@ 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`.
-* `[, ...arg]` Optional arguments to pass when the `callback` is called.
+* `...args` {any} Optional arguments to pass when the `callback` is called.
Schedules repeated execution of `callback` every `delay` milliseconds.
Returns a `Timeout` for use with [`clearInterval()`][].
@@ -105,7 +105,7 @@ set to `1`.
If `callback` is not a function, a [`TypeError`][] will be thrown.
-### setTimeout(callback, delay[, ...arg])
+### setTimeout(callback, delay[, ...args])
<!-- YAML
added: v0.0.1
-->
@@ -113,7 +113,7 @@ 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`.
-* `[, ...arg]` Optional arguments to pass when the `callback` is called.
+* `...args` {any} Optional arguments to pass when the `callback` is called.
Schedules execution of a one-time `callback` after `delay` milliseconds.
Returns a `Timeout` for use with [`clearTimeout()`][].
@@ -168,6 +168,6 @@ Cancels a `Timeout` object created by [`setTimeout()`][].
[`clearImmediate()`]: timers.html#timers_clearimmediate_immediate
[`clearInterval()`]: timers.html#timers_clearinterval_timeout
[`clearTimeout()`]: timers.html#timers_cleartimeout_timeout
-[`setImmediate()`]: timers.html#timers_setimmediate_callback_arg
-[`setInterval()`]: timers.html#timers_setinterval_callback_delay_arg
-[`setTimeout()`]: timers.html#timers_settimeout_callback_delay_arg
+[`setImmediate()`]: timers.html#timers_setimmediate_callback_args
+[`setInterval()`]: timers.html#timers_setinterval_callback_delay_args
+[`setTimeout()`]: timers.html#timers_settimeout_callback_delay_args