Skip to content

Commit 05e02e6

Browse files
committed
doc: correctly use integer vs number
1 parent b87312b commit 05e02e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+832
-832
lines changed

doc/api/async_context.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ asyncResource.triggerAsyncId();
497497

498498
* `type` {string} The type of async event.
499499
* `options` {Object}
500-
* `triggerAsyncId` {number} The ID of the execution context that created this
500+
* `triggerAsyncId` {integer} The ID of the execution context that created this
501501
async event. **Default:** `executionAsyncId()`.
502502
* `requireManualDestroy` {boolean} If set to `true`, disables `emitDestroy`
503503
when the object is garbage collected. This usually does not need to be set
@@ -614,11 +614,11 @@ never be called.
614614

615615
### `asyncResource.asyncId()`
616616

617-
* Returns: {number} The unique `asyncId` assigned to the resource.
617+
* Returns: {integer} The unique `asyncId` assigned to the resource.
618618

619619
### `asyncResource.triggerAsyncId()`
620620

621-
* Returns: {number} The same `triggerAsyncId` that is passed to the
621+
* Returns: {integer} The same `triggerAsyncId` that is passed to the
622622
`AsyncResource` constructor.
623623

624624
<a id="async-resource-worker-pool"></a>

doc/api/async_hooks.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ instance is destroyed.
305305

306306
#### `init(asyncId, type, triggerAsyncId, resource)`
307307

308-
* `asyncId` {number} A unique ID for the async resource.
308+
* `asyncId` {integer} A unique ID for the async resource.
309309
* `type` {string} The type of the async resource.
310-
* `triggerAsyncId` {number} The unique ID of the async resource in whose
310+
* `triggerAsyncId` {integer} The unique ID of the async resource in whose
311311
execution context this async resource was created.
312312
* `resource` {Object} Reference to the resource representing the async
313313
operation, needs to be released during _destroy_.
@@ -585,7 +585,7 @@ TCPSERVERWRAP(5)
585585

586586
#### `before(asyncId)`
587587

588-
* `asyncId` {number}
588+
* `asyncId` {integer}
589589

590590
When an asynchronous operation is initiated (such as a TCP server receiving a
591591
new connection) or completes (such as writing data to disk) a callback is
@@ -602,7 +602,7 @@ it only once.
602602

603603
#### `after(asyncId)`
604604

605-
* `asyncId` {number}
605+
* `asyncId` {integer}
606606

607607
Called immediately after the callback specified in `before` is completed.
608608

@@ -612,7 +612,7 @@ handler runs.
612612

613613
#### `destroy(asyncId)`
614614

615-
* `asyncId` {number}
615+
* `asyncId` {integer}
616616

617617
Called after the resource corresponding to `asyncId` is destroyed. It is also
618618
called asynchronously from the embedder API `emitDestroy()`.
@@ -631,7 +631,7 @@ tracking of `Promise` instances via the garbage collector.
631631
added: v8.6.0
632632
-->
633633

634-
* `asyncId` {number}
634+
* `asyncId` {integer}
635635

636636
Called when the `resolve` function passed to the `Promise` constructor is
637637
invoked (either directly or through other means of resolving a promise).
@@ -760,7 +760,7 @@ changes:
760760
description: Renamed from `currentId`.
761761
-->
762762
763-
* Returns: {number} The `asyncId` of the current execution context. Useful to
763+
* Returns: {integer} The `asyncId` of the current execution context. Useful to
764764
track when something calls.
765765
766766
```mjs
@@ -806,7 +806,7 @@ See the section on [promise execution tracking][].
806806
807807
### `async_hooks.triggerAsyncId()`
808808
809-
* Returns: {number} The ID of the resource responsible for calling the callback
809+
* Returns: {integer} The ID of the resource responsible for calling the callback
810810
that is currently being executed.
811811
812812
```js

doc/api/buffer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ added:
548548
- v14.18.0
549549
-->
550550

551-
* `start` {number} The starting index.
552-
* `end` {number} The ending index.
551+
* `start` {integer} The starting index.
552+
* `end` {integer} The ending index.
553553
* `type` {string} The content-type for the new `Blob`
554554

555555
Creates and returns a new `Blob` containing a subset of this `Blob` objects
@@ -5132,7 +5132,7 @@ added:
51325132
to `'native'`, line endings in string source parts will be converted to
51335133
the platform native line-ending as specified by `require('node:os').EOL`.
51345134
* `type` {string} The File content-type.
5135-
* `lastModified` {number} The last modified date of the file.
5135+
* `lastModified` {integer} The last modified date of the file.
51365136
**Default:** `Date.now()`.
51375137

51385138
### `file.name`
@@ -5155,7 +5155,7 @@ added:
51555155
- v18.13.0
51565156
-->
51575157

5158-
* Type: {number}
5158+
* Type: {integer}
51595159

51605160
The last modified date of the `File`.
51615161

doc/api/child_process.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ changes:
195195
`'/bin/sh'` on Unix, `process.env.ComSpec` on Windows.
196196
* `signal` {AbortSignal} allows aborting the child process using an
197197
AbortSignal.
198-
* `timeout` {number} **Default:** `0`
199-
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
198+
* `timeout` {integer} **Default:** `0`
199+
* `maxBuffer` {integer} Largest amount of data in bytes allowed on stdout or
200200
stderr. If exceeded, the child process is terminated and any output is
201201
truncated. See caveat at [`maxBuffer` and Unicode][].
202202
**Default:** `1024 * 1024`.
203203
* `killSignal` {string|integer} **Default:** `'SIGTERM'`
204-
* `uid` {number} Sets the user identity of the process (see setuid(2)).
205-
* `gid` {number} Sets the group identity of the process (see setgid(2)).
204+
* `uid` {integer} Sets the user identity of the process (see setuid(2)).
205+
* `gid` {integer} Sets the group identity of the process (see setgid(2)).
206206
* `windowsHide` {boolean} Hide the subprocess console window that would
207207
normally be created on Windows systems. **Default:** `false`.
208208
* `callback` {Function} called with the output when process terminates.
@@ -375,14 +375,14 @@ changes:
375375
* `cwd` {string|URL} Current working directory of the child process.
376376
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
377377
* `encoding` {string} **Default:** `'utf8'`
378-
* `timeout` {number} **Default:** `0`
379-
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
378+
* `timeout` {integer} **Default:** `0`
379+
* `maxBuffer` {integer} Largest amount of data in bytes allowed on stdout or
380380
stderr. If exceeded, the child process is terminated and any output is
381381
truncated. See caveat at [`maxBuffer` and Unicode][].
382382
**Default:** `1024 * 1024`.
383383
* `killSignal` {string|integer} **Default:** `'SIGTERM'`
384-
* `uid` {number} Sets the user identity of the process (see setuid(2)).
385-
* `gid` {number} Sets the group identity of the process (see setgid(2)).
384+
* `uid` {integer} Sets the user identity of the process (see setuid(2)).
385+
* `gid` {integer} Sets the group identity of the process (see setgid(2)).
386386
* `windowsHide` {boolean} Hide the subprocess console window that would
387387
normally be created on Windows systems. **Default:** `false`.
388388
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
@@ -547,7 +547,7 @@ changes:
547547
* `execPath` {string} Executable used to create the child process.
548548
* `execArgv` {string\[]} List of string arguments passed to the executable.
549549
**Default:** `process.execArgv`.
550-
* `gid` {number} Sets the group identity of the process (see setgid(2)).
550+
* `gid` {integer} Sets the group identity of the process (see setgid(2)).
551551
* `serialization` {string} Specify the kind of serialization used for sending
552552
messages between processes. Possible values are `'json'` and `'advanced'`.
553553
See [Advanced serialization][] for more details. **Default:** `'json'`.
@@ -564,10 +564,10 @@ changes:
564564
When this option is provided, it overrides `silent`. If the array variant
565565
is used, it must contain exactly one item with value `'ipc'` or an error
566566
will be thrown. For instance `[0, 1, 2, 'ipc']`.
567-
* `uid` {number} Sets the user identity of the process (see setuid(2)).
567+
* `uid` {integer} Sets the user identity of the process (see setuid(2)).
568568
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
569569
done on Windows. Ignored on Unix. **Default:** `false`.
570-
* `timeout` {number} In milliseconds the maximum amount of time the process
570+
* `timeout` {integer} In milliseconds the maximum amount of time the process
571571
is allowed to run. **Default:** `undefined`.
572572
* Returns: {ChildProcess}
573573

@@ -700,8 +700,8 @@ changes:
700700
* `detached` {boolean} Prepare child process to run independently of
701701
its parent process. Specific behavior depends on the platform (see
702702
[`options.detached`][]).
703-
* `uid` {number} Sets the user identity of the process (see setuid(2)).
704-
* `gid` {number} Sets the group identity of the process (see setgid(2)).
703+
* `uid` {integer} Sets the user identity of the process (see setuid(2)).
704+
* `gid` {integer} Sets the group identity of the process (see setgid(2)).
705705
* `serialization` {string} Specify the kind of serialization used for sending
706706
messages between processes. Possible values are `'json'` and `'advanced'`.
707707
See [Advanced serialization][] for more details. **Default:** `'json'`.
@@ -716,7 +716,7 @@ changes:
716716
normally be created on Windows systems. **Default:** `false`.
717717
* `signal` {AbortSignal} allows aborting the child process using an
718718
AbortSignal.
719-
* `timeout` {number} In milliseconds the maximum amount of time the process
719+
* `timeout` {integer} In milliseconds the maximum amount of time the process
720720
is allowed to run. **Default:** `undefined`.
721721
* `killSignal` {string|integer} The signal value to be used when the spawned
722722
process will be killed by timeout or abort signal. **Default:** `'SIGTERM'`.
@@ -1179,13 +1179,13 @@ changes:
11791179
be output to the parent process' stderr unless `stdio` is specified.
11801180
**Default:** `'pipe'`.
11811181
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
1182-
* `uid` {number} Sets the user identity of the process (see setuid(2)).
1183-
* `gid` {number} Sets the group identity of the process (see setgid(2)).
1184-
* `timeout` {number} In milliseconds the maximum amount of time the process
1182+
* `uid` {integer} Sets the user identity of the process (see setuid(2)).
1183+
* `gid` {integer} Sets the group identity of the process (see setgid(2)).
1184+
* `timeout` {integer} In milliseconds the maximum amount of time the process
11851185
is allowed to run. **Default:** `undefined`.
11861186
* `killSignal` {string|integer} The signal value to be used when the spawned
11871187
process will be killed. **Default:** `'SIGTERM'`.
1188-
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
1188+
* `maxBuffer` {integer} Largest amount of data in bytes allowed on stdout or
11891189
stderr. If exceeded, the child process is terminated. See caveat at
11901190
[`maxBuffer` and Unicode][]. **Default:** `1024 * 1024`.
11911191
* `encoding` {string} The encoding used for all stdio inputs and outputs.
@@ -1309,13 +1309,13 @@ changes:
13091309
* `shell` {string} Shell to execute the command with. See
13101310
[Shell requirements][] and [Default Windows shell][]. **Default:**
13111311
`'/bin/sh'` on Unix, `process.env.ComSpec` on Windows.
1312-
* `uid` {number} Sets the user identity of the process. (See setuid(2)).
1313-
* `gid` {number} Sets the group identity of the process. (See setgid(2)).
1314-
* `timeout` {number} In milliseconds the maximum amount of time the process
1312+
* `uid` {integer} Sets the user identity of the process. (See setuid(2)).
1313+
* `gid` {integer} Sets the group identity of the process. (See setgid(2)).
1314+
* `timeout` {integer} In milliseconds the maximum amount of time the process
13151315
is allowed to run. **Default:** `undefined`.
13161316
* `killSignal` {string|integer} The signal value to be used when the spawned
13171317
process will be killed. **Default:** `'SIGTERM'`.
1318-
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
1318+
* `maxBuffer` {integer} Largest amount of data in bytes allowed on stdout or
13191319
stderr. If exceeded, the child process is terminated and any output is
13201320
truncated. See caveat at [`maxBuffer` and Unicode][].
13211321
**Default:** `1024 * 1024`.
@@ -1383,13 +1383,13 @@ changes:
13831383
* `stdio` {string|Array} Child's stdio configuration.
13841384
See [`child_process.spawn()`][]'s [`stdio`][]. **Default:** `'pipe'`.
13851385
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
1386-
* `uid` {number} Sets the user identity of the process (see setuid(2)).
1387-
* `gid` {number} Sets the group identity of the process (see setgid(2)).
1388-
* `timeout` {number} In milliseconds the maximum amount of time the process
1386+
* `uid` {integer} Sets the user identity of the process (see setuid(2)).
1387+
* `gid` {integer} Sets the group identity of the process (see setgid(2)).
1388+
* `timeout` {integer} In milliseconds the maximum amount of time the process
13891389
is allowed to run. **Default:** `undefined`.
13901390
* `killSignal` {string|integer} The signal value to be used when the spawned
13911391
process will be killed. **Default:** `'SIGTERM'`.
1392-
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
1392+
* `maxBuffer` {integer} Largest amount of data in bytes allowed on stdout or
13931393
stderr. If exceeded, the child process is terminated and any output is
13941394
truncated. See caveat at [`maxBuffer` and Unicode][].
13951395
**Default:** `1024 * 1024`.
@@ -1405,11 +1405,11 @@ changes:
14051405
* `windowsHide` {boolean} Hide the subprocess console window that would
14061406
normally be created on Windows systems. **Default:** `false`.
14071407
* Returns: {Object}
1408-
* `pid` {number} Pid of the child process.
1408+
* `pid` {integer} Pid of the child process.
14091409
* `output` {Array} Array of results from stdio output.
14101410
* `stdout` {Buffer|string} The contents of `output[1]`.
14111411
* `stderr` {Buffer|string} The contents of `output[2]`.
1412-
* `status` {number|null} The exit code of the subprocess, or `null` if the
1412+
* `status` {integer|null} The exit code of the subprocess, or `null` if the
14131413
subprocess terminated due to a signal.
14141414
* `signal` {string|null} The signal used to kill the subprocess, or `null` if
14151415
the subprocess did not terminate due to a signal.
@@ -1448,7 +1448,7 @@ instances of `ChildProcess`.
14481448
added: v0.7.7
14491449
-->
14501450
1451-
* `code` {number} The exit code if the child process exited on its own, or
1451+
* `code` {integer} The exit code if the child process exited on its own, or
14521452
`null` if the child process terminated due to a signal.
14531453
* `signal` {string} The signal by which the child process was terminated, or
14541454
`null` if the child process did not terminated due to a signal.
@@ -1533,7 +1533,7 @@ See also [`subprocess.kill()`][] and [`subprocess.send()`][].
15331533
added: v0.1.90
15341534
-->
15351535
1536-
* `code` {number} The exit code if the child process exited on its own, or
1536+
* `code` {integer} The exit code if the child process exited on its own, or
15371537
`null` if the child process terminated due to a signal.
15381538
* `signal` {string} The signal by which the child process was terminated, or
15391539
`null` if the child process did not terminated due to a signal.
@@ -1673,7 +1673,7 @@ If the child process is still running, the field will be `null`.
16731673
added: v0.1.90
16741674
-->
16751675
1676-
* `signal` {number|string}
1676+
* `signal` {integer|string}
16771677
* Returns: {boolean}
16781678
16791679
The `subprocess.kill()` method sends a signal to the child process. If no

doc/api/cluster.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Within a worker, `process.on('error')` may also be used.
188188
added: v0.11.2
189189
-->
190190

191-
* `code` {number} The exit code, if it exited normally.
191+
* `code` {integer} The exit code, if it exited normally.
192192
* `signal` {string} The name of the signal (e.g. `'SIGHUP'`) that caused
193193
the process to be killed.
194194

@@ -679,7 +679,7 @@ added: v0.7.9
679679
-->
680680

681681
* `worker` {cluster.Worker}
682-
* `code` {number} The exit code, if it exited normally.
682+
* `code` {integer} The exit code, if it exited normally.
683683
* `signal` {string} The name of the signal (e.g. `'SIGHUP'`) that caused
684684
the process to be killed.
685685

@@ -937,11 +937,11 @@ changes:
937937
cluster module relies on IPC to function, this configuration must contain an
938938
`'ipc'` entry. When this option is provided, it overrides `silent`. See
939939
[`child_process.spawn()`][]'s [`stdio`][].
940-
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
941-
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
942-
* `inspectPort` {number|Function} Sets inspector port of worker.
943-
This can be a number, or a function that takes no arguments and returns a
944-
number. By default each worker gets its own port, incremented from the
940+
* `uid` {integer} Sets the user identity of the process. (See setuid(2).)
941+
* `gid` {integer} Sets the group identity of the process. (See setgid(2).)
942+
* `inspectPort` {integer|Function} Sets inspector port of worker.
943+
This can be a integer, or a function that takes no arguments and returns a
944+
integer. By default each worker gets its own port, incremented from the
945945
primary's `process.debugPort`.
946946
* `windowsHide` {boolean} Hide the forked processes console window that would
947947
normally be created on Windows systems. **Default:** `false`.

doc/api/console.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ changes:
133133
**Default:** `'auto'`.
134134
* `inspectOptions` {Object} Specifies options that are passed along to
135135
[`util.inspect()`][].
136-
* `groupIndentation` {number} Set group indentation.
136+
* `groupIndentation` {integer} Set group indentation.
137137
**Default:** `2`.
138138

139139
Creates a new `Console` with one or two writable stream instances. `stdout` is a
@@ -309,7 +309,7 @@ added: v0.1.101
309309
* `options` {Object}
310310
* `showHidden` {boolean} If `true` then the object's non-enumerable and symbol
311311
properties will be shown too. **Default:** `false`.
312-
* `depth` {number} Tells [`util.inspect()`][] how many times to recurse while
312+
* `depth` {integer} Tells [`util.inspect()`][] how many times to recurse while
313313
formatting the object. This is useful for inspecting large complicated
314314
objects. To make it recurse indefinitely, pass `null`. **Default:** `2`.
315315
* `colors` {boolean} If `true`, then the output will be styled with ANSI color

0 commit comments

Comments
 (0)