@@ -28,7 +28,7 @@ functions that can be used to control this default behavior.
2828added: v9.7.0
2929-->
3030
31- * Returns: {Immediate}
31+ * Returns: {Immediate} a reference to ` immediate `
3232
3333When called, requests that the Node.js event loop * not* exit so long as the
3434` Immediate ` is active. Calling ` immediate.ref() ` multiple times will have no
@@ -37,22 +37,18 @@ effect.
3737By default, all ` Immediate ` objects are "ref'ed", making it normally unnecessary
3838to call ` immediate.ref() ` unless ` immediate.unref() ` had been called previously.
3939
40- Returns a reference to the ` Immediate ` .
41-
4240### immediate.unref()
4341<!-- YAML
4442added: v9.7.0
4543-->
4644
47- * Returns: {Immediate}
45+ * Returns: {Immediate} a reference to ` immediate `
4846
4947When called, the active ` Immediate ` object will not require the Node.js event
5048loop to remain active. If there is no other activity keeping the event loop
5149running, the process may exit before the ` Immediate ` object's callback is
5250invoked. Calling ` immediate.unref() ` multiple times will have no effect.
5351
54- Returns a reference to the ` Immediate ` .
55-
5652## Class: Timeout
5753
5854This object is created internally and is returned from [ ` setTimeout() ` ] [ ] and
@@ -70,22 +66,20 @@ control this default behavior.
7066added: v0.9.1
7167-->
7268
73- * Returns: {Timeout}
69+ * Returns: {Timeout} a reference to ` timeout `
7470
7571When called, requests that the Node.js event loop * not* exit so long as the
7672` Timeout ` is active. Calling ` timeout.ref() ` multiple times will have no effect.
7773
7874By default, all ` Timeout ` objects are "ref'ed", making it normally unnecessary
7975to call ` timeout.ref() ` unless ` timeout.unref() ` had been called previously.
8076
81- Returns a reference to the ` Timeout ` .
82-
8377### timeout.unref()
8478<!-- YAML
8579added: v0.9.1
8680-->
8781
88- * Returns: {Timeout}
82+ * Returns: {Timeout} a reference to ` timeout `
8983
9084When called, the active ` Timeout ` object will not require the Node.js event loop
9185to remain active. If there is no other activity keeping the event loop running,
@@ -96,8 +90,6 @@ Calling `timeout.unref()` creates an internal timer that will wake the Node.js
9690event loop. Creating too many of these can adversely impact performance
9791of the Node.js application.
9892
99- Returns a reference to the ` Timeout ` .
100-
10193## Scheduling Timers
10294
10395A timer in Node.js is an internal construct that calls a given function after
@@ -113,9 +105,10 @@ added: v0.9.1
113105* ` callback ` {Function} The function to call at the end of this turn of
114106 [ the Node.js Event Loop]
115107* ` ...args ` {any} Optional arguments to pass when the ` callback ` is called.
108+ * Returns: {Immediate} for use with [ ` clearImmediate() ` ] [ ]
116109
117110Schedules the "immediate" execution of the ` callback ` after I/O events'
118- callbacks. Returns an ` Immediate ` for use with [ ` clearImmediate() ` ] [ ] .
111+ callbacks.
119112
120113When multiple calls to ` setImmediate() ` are made, the ` callback ` functions are
121114queued for execution in the order in which they are created. The entire callback
@@ -155,10 +148,9 @@ added: v0.0.1
155148* ` delay ` {number} The number of milliseconds to wait before calling the
156149 ` callback ` .
157150* ` ...args ` {any} Optional arguments to pass when the ` callback ` is called.
158- * Returns: {Timeout}
151+ * Returns: {Timeout} for use with [ ` clearInterval() ` ] [ ]
159152
160153Schedules repeated execution of ` callback ` every ` delay ` milliseconds.
161- Returns a ` Timeout ` for use with [ ` clearInterval() ` ] [ ] .
162154
163155When ` delay ` is larger than ` 2147483647 ` or less than ` 1 ` , the ` delay ` will be
164156set to ` 1 ` .
@@ -174,10 +166,9 @@ added: v0.0.1
174166* ` delay ` {number} The number of milliseconds to wait before calling the
175167 ` callback ` .
176168* ` ...args ` {any} Optional arguments to pass when the ` callback ` is called.
177- * Returns: {Timeout}
169+ * Returns: {Timeout} for use with [ ` clearTimeout() ` ] [ ]
178170
179171Schedules execution of a one-time ` callback ` after ` delay ` milliseconds.
180- Returns a ` Timeout ` for use with [ ` clearTimeout() ` ] [ ] .
181172
182173The ` callback ` will likely not be invoked in precisely ` delay ` milliseconds.
183174Node.js makes no guarantees about the exact timing of when callbacks will fire,
0 commit comments