Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix more type case inconsistencies #11697

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ added: v0.1.21
* `actual` {any}
* `expected` {any}
* `message` {any}
* `operator` {String}
* `operator` {string}

Throws an `AssertionError`. If `message` is falsy, the error message is set as
the values of `actual` and `expected` separated by the provided `operator`.
Expand Down
204 changes: 102 additions & 102 deletions doc/api/buffer.md

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ added: v0.1.90
understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows,
command line parsing should be compatible with `cmd.exe`.)
* `timeout` {number} (Default: `0`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
* `killSignal` {string|Integer} (Default: `'SIGTERM'`)
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `callback` {Function} called with the output when process terminates
Expand Down Expand Up @@ -212,9 +212,9 @@ added: v0.1.91
* `env` {Object} Environment key-value pairs
* `encoding` {string} (Default: `'utf8'`)
* `timeout` {number} (Default: `0`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
* `killSignal` {string|Integer} (Default: `'SIGTERM'`)
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `callback` {Function} called with the output when process terminates
Expand Down Expand Up @@ -608,17 +608,17 @@ changes:
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
to the spawned process
- supplying this value will override `stdio[0]`
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`)
* `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
- `stderr` by default will be output to the parent process' stderr unless
`stdio` is specified
* `env` {Object} Environment key-value pairs
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {number} In milliseconds the maximum amount of time the process
is allowed to run. (Default: `undefined`)
* `killSignal` {string|Integer} The signal value to be used when the spawned
* `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`)
* Returns: {Buffer|string} The stdout from the command
Expand Down Expand Up @@ -650,7 +650,7 @@ changes:
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
to the spawned process
- supplying this value will override `stdio[0]`
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`)
* `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
- `stderr` by default will be output to the parent process' stderr unless
`stdio` is specified
* `env` {Object} Environment key-value pairs
Expand All @@ -662,9 +662,9 @@ changes:
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {number} In milliseconds the maximum amount of time the process
is allowed to run. (Default: `undefined`)
* `killSignal` {string|Integer} The signal value to be used when the spawned
* `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs.
(Default: `'buffer'`)
Expand Down Expand Up @@ -708,15 +708,15 @@ changes:
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
to the spawned process
- supplying this value will override `stdio[0]`
* `stdio` {string | Array} Child's stdio configuration.
* `stdio` {string|Array} Child's stdio configuration.
* `env` {Object} Environment key-value pairs
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {number} In milliseconds the maximum amount of time the process
is allowed to run. (Default: `undefined`)
* `killSignal` {string|Integer} The signal value to be used when the spawned
* `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs.
(Default: `'buffer'`)
Expand Down Expand Up @@ -846,7 +846,7 @@ IPC channel currently exists, this property is `undefined`.
added: v0.7.2
-->

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

The `child.connected` property indicates whether it is still possible to send
and receive messages from a child process. When `child.connected` is `false`, it
Expand Down Expand Up @@ -933,7 +933,7 @@ setTimeout(() => {
added: v0.1.90
-->

* {Number} Integer
* {number} Integer

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

Expand Down Expand Up @@ -967,7 +967,7 @@ changes:
* `sendHandle` {Handle}
* `options` {Object}
* `callback` {Function}
* Returns: {Boolean}
* Returns: {boolean}

When an IPC channel has been established between the parent and child (
i.e. when using [`child_process.fork()`][]), the `child.send()` method can be
Expand Down
8 changes: 4 additions & 4 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ if (cluster.isMaster) {
added: v6.0.0
-->

* {Boolean}
* {boolean}

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

Expand All @@ -356,7 +356,7 @@ worker.kill();
added: v0.8.0
-->

* {Number}
* {number}

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

* {Boolean}
* {boolean}

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

* {Boolean}
* {boolean}

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

Expand Down
10 changes: 5 additions & 5 deletions doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ added: v0.1.101
-->
* `obj` {any}
* `options` {Object}
* `showHidden` {Boolean}
* `depth` {Number}
* `colors` {Boolean}
* `showHidden` {boolean}
* `depth` {number}
* `colors` {boolean}

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

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

Stops a timer that was previously started by calling [`console.time()`][] and
prints the result to `stdout`:
Expand Down
20 changes: 10 additions & 10 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,8 @@ The `private_key` argument can be an object or a string. If `private_key` is a
string, it is treated as a raw key with no passphrase. If `private_key` is an
object, it is interpreted as a hash containing two properties:

* `key` : {String} - PEM encoded private key
* `passphrase` : {String} - passphrase for the private key
* `key`: {string} - PEM encoded private key
* `passphrase`: {string} - passphrase for the private key

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

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

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

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

* `key` : {String} - PEM encoded public key
* `passphrase` : {String} - Optional passphrase for the private key
* `key`: {string} - PEM encoded public key
* `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING`
Expand Down
4 changes: 2 additions & 2 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ Alternatively, `options` can be an object containing these properties:

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

All properties are optional.
Expand Down
18 changes: 9 additions & 9 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ new MyError().stack;

### Error.stackTraceLimit

* {Number}
* {number}

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

### error.message

* {String}
* {string}

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

### error.stack

* {String}
* {string}

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

#### error.code

* {String}
* {string}

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

#### error.errno

* {String | Number}
* {string|number}

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

#### error.syscall

* {String}
* {string}

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

#### error.path

* {String}
* {string}

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

#### error.address

* {String}
* {string}

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

#### error.port

* {Number}
* {number}

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