Skip to content

Commit fa6ac14

Browse files
TrottMylesBorins
authored andcommitted
doc,timers: use code markup/markdown in headers
Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 37e3243 commit fa6ac14

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

doc/api/timers.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The timer functions within Node.js implement a similar API as the timers API
1212
provided by Web Browsers but use a different internal implementation that is
1313
built around the Node.js [Event Loop][].
1414

15-
## Class: Immediate
15+
## Class: `Immediate`
1616

1717
This object is created internally and is returned from [`setImmediate()`][]. It
1818
can be passed to [`clearImmediate()`][] in order to cancel the scheduled
@@ -23,7 +23,7 @@ running as long as the immediate is active. The `Immediate` object returned by
2323
[`setImmediate()`][] exports both `immediate.ref()` and `immediate.unref()`
2424
functions that can be used to control this default behavior.
2525

26-
### immediate.hasRef()
26+
### `immediate.hasRef()`
2727
<!-- YAML
2828
added: v11.0.0
2929
-->
@@ -32,7 +32,7 @@ added: v11.0.0
3232

3333
If true, the `Immediate` object will keep the Node.js event loop active.
3434

35-
### immediate.ref()
35+
### `immediate.ref()`
3636
<!-- YAML
3737
added: v9.7.0
3838
-->
@@ -46,7 +46,7 @@ effect.
4646
By default, all `Immediate` objects are "ref'ed", making it normally unnecessary
4747
to call `immediate.ref()` unless `immediate.unref()` had been called previously.
4848

49-
### immediate.unref()
49+
### `immediate.unref()`
5050
<!-- YAML
5151
added: v9.7.0
5252
-->
@@ -58,7 +58,7 @@ loop to remain active. If there is no other activity keeping the event loop
5858
running, the process may exit before the `Immediate` object's callback is
5959
invoked. Calling `immediate.unref()` multiple times will have no effect.
6060

61-
## Class: Timeout
61+
## Class: `Timeout`
6262

6363
This object is created internally and is returned from [`setTimeout()`][] and
6464
[`setInterval()`][]. It can be passed to either [`clearTimeout()`][] or
@@ -70,7 +70,7 @@ timer is active. Each of the `Timeout` objects returned by these functions
7070
export both `timeout.ref()` and `timeout.unref()` functions that can be used to
7171
control this default behavior.
7272

73-
### timeout.hasRef()
73+
### `timeout.hasRef()`
7474
<!-- YAML
7575
added: v11.0.0
7676
-->
@@ -79,7 +79,7 @@ added: v11.0.0
7979

8080
If true, the `Timeout` object will keep the Node.js event loop active.
8181

82-
### timeout.ref()
82+
### `timeout.ref()`
8383
<!-- YAML
8484
added: v0.9.1
8585
-->
@@ -92,7 +92,7 @@ When called, requests that the Node.js event loop *not* exit so long as the
9292
By default, all `Timeout` objects are "ref'ed", making it normally unnecessary
9393
to call `timeout.ref()` unless `timeout.unref()` had been called previously.
9494

95-
### timeout.refresh()
95+
### `timeout.refresh()`
9696
<!-- YAML
9797
added: v10.2.0
9898
-->
@@ -107,7 +107,7 @@ JavaScript object.
107107
Using this on a timer that has already called its callback will reactivate the
108108
timer.
109109

110-
### timeout.unref()
110+
### `timeout.unref()`
111111
<!-- YAML
112112
added: v0.9.1
113113
-->
@@ -130,7 +130,7 @@ a certain period of time. When a timer's function is called varies depending on
130130
which method was used to create the timer and what other work the Node.js
131131
event loop is doing.
132132

133-
### setImmediate(callback\[, ...args\])
133+
### `setImmediate(callback[, ...args])`
134134
<!-- YAML
135135
added: v0.9.1
136136
-->
@@ -172,7 +172,7 @@ async function timerExample() {
172172
timerExample();
173173
```
174174

175-
### setInterval(callback, delay\[, ...args\])
175+
### `setInterval(callback, delay[, ...args])`
176176
<!-- YAML
177177
added: v0.0.1
178178
-->
@@ -190,7 +190,7 @@ set to `1`. Non-integer delays are truncated to an integer.
190190

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

193-
### setTimeout(callback, delay\[, ...args\])
193+
### `setTimeout(callback, delay[, ...args])`
194194
<!-- YAML
195195
added: v0.0.1
196196
-->
@@ -235,7 +235,7 @@ cancel the timer and prevent it from triggering.
235235
It is not possible to cancel timers that were created using the promisified
236236
variants of [`setImmediate()`][], [`setTimeout()`][].
237237

238-
### clearImmediate(immediate)
238+
### `clearImmediate(immediate)`
239239
<!-- YAML
240240
added: v0.9.1
241241
-->
@@ -245,7 +245,7 @@ added: v0.9.1
245245

246246
Cancels an `Immediate` object created by [`setImmediate()`][].
247247

248-
### clearInterval(timeout)
248+
### `clearInterval(timeout)`
249249
<!-- YAML
250250
added: v0.0.1
251251
-->
@@ -254,7 +254,7 @@ added: v0.0.1
254254

255255
Cancels a `Timeout` object created by [`setInterval()`][].
256256

257-
### clearTimeout(timeout)
257+
### `clearTimeout(timeout)`
258258
<!-- YAML
259259
added: v0.0.1
260260
-->

0 commit comments

Comments
 (0)