Skip to content

Commit 757bf48

Browse files
silverwinditaloacasas
authored andcommitted
doc/tools: fix more type inconsistencies
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: #11697 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
1 parent 5a9e30f commit 757bf48

19 files changed

+408
-407
lines changed

doc/api/assert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ added: v0.1.21
241241
* `actual` {any}
242242
* `expected` {any}
243243
* `message` {any}
244-
* `operator` {String}
244+
* `operator` {string}
245245

246246
Throws an `AssertionError`. If `message` is falsy, the error message is set as
247247
the values of `actual` and `expected` separated by the provided `operator`.

doc/api/buffer.md

Lines changed: 102 additions & 102 deletions
Large diffs are not rendered by default.

doc/api/child_process.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ added: v0.1.90
135135
understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows,
136136
command line parsing should be compatible with `cmd.exe`.)
137137
* `timeout` {number} (Default: `0`)
138-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
138+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
139139
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
140-
* `killSignal` {string|Integer} (Default: `'SIGTERM'`)
140+
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
141141
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
142142
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
143143
* `callback` {Function} called with the output when process terminates
@@ -212,9 +212,9 @@ added: v0.1.91
212212
* `env` {Object} Environment key-value pairs
213213
* `encoding` {string} (Default: `'utf8'`)
214214
* `timeout` {number} (Default: `0`)
215-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
215+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
216216
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
217-
* `killSignal` {string|Integer} (Default: `'SIGTERM'`)
217+
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
218218
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
219219
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
220220
* `callback` {Function} called with the output when process terminates
@@ -602,17 +602,17 @@ changes:
602602
* `input` {string|Buffer} The value which will be passed as stdin to the
603603
spawned process
604604
- supplying this value will override `stdio[0]`
605-
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`)
605+
* `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
606606
- `stderr` by default will be output to the parent process' stderr unless
607607
`stdio` is specified
608608
* `env` {Object} Environment key-value pairs
609609
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
610610
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
611611
* `timeout` {number} In milliseconds the maximum amount of time the process
612612
is allowed to run. (Default: `undefined`)
613-
* `killSignal` {string|Integer} The signal value to be used when the spawned
613+
* `killSignal` {string|integer} The signal value to be used when the spawned
614614
process will be killed. (Default: `'SIGTERM'`)
615-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
615+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
616616
stdout or stderr - if exceeded child process is killed
617617
* `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`)
618618
* Returns: {Buffer|string} The stdout from the command
@@ -640,7 +640,7 @@ added: v0.11.12
640640
* `input` {string|Buffer} The value which will be passed as stdin to the
641641
spawned process
642642
- supplying this value will override `stdio[0]`
643-
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`)
643+
* `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
644644
- `stderr` by default will be output to the parent process' stderr unless
645645
`stdio` is specified
646646
* `env` {Object} Environment key-value pairs
@@ -652,9 +652,9 @@ added: v0.11.12
652652
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
653653
* `timeout` {number} In milliseconds the maximum amount of time the process
654654
is allowed to run. (Default: `undefined`)
655-
* `killSignal` {string|Integer} The signal value to be used when the spawned
655+
* `killSignal` {string|integer} The signal value to be used when the spawned
656656
process will be killed. (Default: `'SIGTERM'`)
657-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
657+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
658658
stdout or stderr - if exceeded child process is killed
659659
* `encoding` {string} The encoding used for all stdio inputs and outputs.
660660
(Default: `'buffer'`)
@@ -695,15 +695,15 @@ changes:
695695
* `input` {string|Buffer} The value which will be passed as stdin to the
696696
spawned process
697697
- supplying this value will override `stdio[0]`
698-
* `stdio` {string | Array} Child's stdio configuration.
698+
* `stdio` {string|Array} Child's stdio configuration.
699699
* `env` {Object} Environment key-value pairs
700700
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
701701
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
702702
* `timeout` {number} In milliseconds the maximum amount of time the process
703703
is allowed to run. (Default: `undefined`)
704-
* `killSignal` {string|Integer} The signal value to be used when the spawned
704+
* `killSignal` {string|integer} The signal value to be used when the spawned
705705
process will be killed. (Default: `'SIGTERM'`)
706-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
706+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
707707
stdout or stderr - if exceeded child process is killed
708708
* `encoding` {string} The encoding used for all stdio inputs and outputs.
709709
(Default: `'buffer'`)
@@ -833,7 +833,7 @@ IPC channel currently exists, this property is `undefined`.
833833
added: v0.7.2
834834
-->
835835

836-
* {Boolean} Set to `false` after `child.disconnect()` is called
836+
* {boolean} Set to `false` after `child.disconnect()` is called
837837

838838
The `child.connected` property indicates whether it is still possible to send
839839
and receive messages from a child process. When `child.connected` is `false`, it
@@ -920,7 +920,7 @@ setTimeout(() => {
920920
added: v0.1.90
921921
-->
922922

923-
* {Number} Integer
923+
* {number} Integer
924924

925925
Returns the process identifier (PID) of the child process.
926926

@@ -954,7 +954,7 @@ changes:
954954
* `sendHandle` {Handle}
955955
* `options` {Object}
956956
* `callback` {Function}
957-
* Returns: {Boolean}
957+
* Returns: {boolean}
958958

959959
When an IPC channel has been established between the parent and child (
960960
i.e. when using [`child_process.fork()`][]), the `child.send()` method can be

doc/api/cluster.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ if (cluster.isMaster) {
332332
added: v6.0.0
333333
-->
334334

335-
* {Boolean}
335+
* {boolean}
336336

337337
Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`.
338338

@@ -356,7 +356,7 @@ worker.kill();
356356
added: v0.8.0
357357
-->
358358

359-
* {Number}
359+
* {number}
360360

361361
Each new worker is given its own unique id, this id is stored in the
362362
`id`.
@@ -691,7 +691,7 @@ This can only be called from the master process.
691691
added: v0.8.1
692692
-->
693693

694-
* {Boolean}
694+
* {boolean}
695695

696696
True if the process is a master. This is determined
697697
by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is
@@ -702,7 +702,7 @@ undefined, then `isMaster` is `true`.
702702
added: v0.6.0
703703
-->
704704

705-
* {Boolean}
705+
* {boolean}
706706

707707
True if the process is not a master (it is the negation of `cluster.isMaster`).
708708

doc/api/console.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ added: v0.1.101
162162
-->
163163
* `obj` {any}
164164
* `options` {Object}
165-
* `showHidden` {Boolean}
166-
* `depth` {Number}
167-
* `colors` {Boolean}
165+
* `showHidden` {boolean}
166+
* `depth` {number}
167+
* `colors` {boolean}
168168

169169
Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`.
170170
This function bypasses any custom `inspect()` function defined on `obj`. An
@@ -243,7 +243,7 @@ values are concatenated. See [`util.format()`][] for more information.
243243
<!-- YAML
244244
added: v0.1.104
245245
-->
246-
* `label` {String}
246+
* `label` {string}
247247

248248
Starts a timer that can be used to compute the duration of an operation. Timers
249249
are identified by a unique `label`. Use the same `label` when you call
@@ -259,7 +259,7 @@ changes:
259259
description: This method no longer supports multiple calls that don’t map
260260
to individual `console.time()` calls; see below for details.
261261
-->
262-
* `label` {String}
262+
* `label` {string}
263263

264264
Stops a timer that was previously started by calling [`console.time()`][] and
265265
prints the result to `stdout`:

doc/api/crypto.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,8 @@ The `private_key` argument can be an object or a string. If `private_key` is a
929929
string, it is treated as a raw key with no passphrase. If `private_key` is an
930930
object, it is interpreted as a hash containing two properties:
931931

932-
* `key` : {String} - PEM encoded private key
933-
* `passphrase` : {String} - passphrase for the private key
932+
* `key`: {string} - PEM encoded private key
933+
* `passphrase`: {string} - passphrase for the private key
934934

935935
The `output_format` can specify one of `'latin1'`, `'hex'` or `'base64'`. If
936936
`output_format` is provided a string is returned; otherwise a [`Buffer`][] is
@@ -1469,8 +1469,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
14691469
If `private_key` is an object, it is interpreted as a hash object with the
14701470
keys:
14711471

1472-
* `key` : {String} - PEM encoded private key
1473-
* `passphrase` : {String} - Optional passphrase for the private key
1472+
* `key`: {string} - PEM encoded private key
1473+
* `passphrase`: {string} - Optional passphrase for the private key
14741474
* `padding` : An optional padding value, one of the following:
14751475
* `crypto.constants.RSA_NO_PADDING`
14761476
* `crypto.constants.RSA_PKCS1_PADDING`
@@ -1490,8 +1490,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
14901490
If `private_key` is an object, it is interpreted as a hash object with the
14911491
keys:
14921492

1493-
* `key` : {String} - PEM encoded private key
1494-
* `passphrase` : {String} - Optional passphrase for the private key
1493+
* `key`: {string} - PEM encoded private key
1494+
* `passphrase`: {string} - Optional passphrase for the private key
14951495
* `padding` : An optional padding value, one of the following:
14961496
* `crypto.constants.RSA_NO_PADDING`
14971497
* `crypto.constants.RSA_PKCS1_PADDING`
@@ -1510,8 +1510,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
15101510
If `public_key` is an object, it is interpreted as a hash object with the
15111511
keys:
15121512

1513-
* `key` : {String} - PEM encoded public key
1514-
* `passphrase` : {String} - Optional passphrase for the private key
1513+
* `key`: {string} - PEM encoded public key
1514+
* `passphrase`: {string} - Optional passphrase for the private key
15151515
* `padding` : An optional padding value, one of the following:
15161516
* `crypto.constants.RSA_NO_PADDING`
15171517
* `crypto.constants.RSA_PKCS1_PADDING`
@@ -1534,8 +1534,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
15341534
If `public_key` is an object, it is interpreted as a hash object with the
15351535
keys:
15361536

1537-
* `key` : {String} - PEM encoded public key
1538-
* `passphrase` : {String} - Optional passphrase for the private key
1537+
* `key`: {string} - PEM encoded public key
1538+
* `passphrase`: {string} - Optional passphrase for the private key
15391539
* `padding` : An optional padding value, one of the following:
15401540
* `crypto.constants.RSA_NO_PADDING`
15411541
* `crypto.constants.RSA_PKCS1_PADDING`

doc/api/dns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ Alternatively, `options` can be an object containing these properties:
8080

8181
* `family` {number} - The record family. If present, must be the integer
8282
`4` or `6`. If not provided, both IP v4 and v6 addresses are accepted.
83-
* `hints`: {Number} - If present, it should be one or more of the supported
83+
* `hints`: {number} - If present, it should be one or more of the supported
8484
`getaddrinfo` flags. If `hints` is not provided, then no flags are passed to
8585
`getaddrinfo`. Multiple flags can be passed through `hints` by bitwise
8686
`OR`ing their values.
8787
See [supported `getaddrinfo` flags][] for more information on supported
8888
flags.
89-
* `all`: {Boolean} - When `true`, the callback returns all resolved addresses
89+
* `all`: {boolean} - When `true`, the callback returns all resolved addresses
9090
in an array, otherwise returns a single address. Defaults to `false`.
9191

9292
All properties are optional.

doc/api/errors.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ new MyError().stack;
243243

244244
### Error.stackTraceLimit
245245

246-
* {Number}
246+
* {number}
247247

248248
The `Error.stackTraceLimit` property specifies the number of stack frames
249249
collected by a stack trace (whether generated by `new Error().stack` or
@@ -257,7 +257,7 @@ not capture any frames.
257257

258258
### error.message
259259

260-
* {String}
260+
* {string}
261261

262262
The `error.message` property is the string description of the error as set by calling `new Error(message)`.
263263
The `message` passed to the constructor will also appear in the first line of
@@ -273,7 +273,7 @@ console.error(err.message);
273273

274274
### error.stack
275275

276-
* {String}
276+
* {string}
277277

278278
The `error.stack` property is a string describing the point in the code at which
279279
the `Error` was instantiated.
@@ -449,14 +449,14 @@ added properties.
449449

450450
#### error.code
451451

452-
* {String}
452+
* {string}
453453

454454
The `error.code` property is a string representing the error code, which is always
455455
`E` followed by a sequence of capital letters.
456456

457457
#### error.errno
458458

459-
* {String | Number}
459+
* {string|number}
460460

461461
The `error.errno` property is a number or a string.
462462
The number is a **negative** value which corresponds to the error code defined in
@@ -466,27 +466,27 @@ In case of a string, it is the same as `error.code`.
466466

467467
#### error.syscall
468468

469-
* {String}
469+
* {string}
470470

471471
The `error.syscall` property is a string describing the [syscall][] that failed.
472472

473473
#### error.path
474474

475-
* {String}
475+
* {string}
476476

477477
When present (e.g. in `fs` or `child_process`), the `error.path` property is a string
478478
containing a relevant invalid pathname.
479479

480480
#### error.address
481481

482-
* {String}
482+
* {string}
483483

484484
When present (e.g. in `net` or `dgram`), the `error.address` property is a string
485485
describing the address to which the connection failed.
486486

487487
#### error.port
488488

489-
* {Number}
489+
* {number}
490490

491491
When present (e.g. in `net` or `dgram`), the `error.port` property is a number representing
492492
the connection's port that is not available.

0 commit comments

Comments
 (0)