doc: specify definite Array types
Replace `{Array}` with `{type[]}`. PR-URL: https://github.com/nodejs/node/pull/19895 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
321c178faa
commit
dff214153f
@ -712,7 +712,8 @@ changes:
|
||||
description: The elements of `list` can now be `Uint8Array`s.
|
||||
-->
|
||||
|
||||
* `list` {Array} List of `Buffer` or [`Uint8Array`] instances to concat.
|
||||
* `list` {Buffer[] | Uint8Array[]} List of `Buffer` or [`Uint8Array`] instances
|
||||
to concat.
|
||||
* `totalLength` {integer} Total length of the `Buffer` instances in `list`
|
||||
when concatenated.
|
||||
* Returns: {Buffer}
|
||||
@ -756,7 +757,7 @@ console.log(bufA.length);
|
||||
added: v5.10.0
|
||||
-->
|
||||
|
||||
* `array` {Array}
|
||||
* `array` {integer[]}
|
||||
|
||||
Allocates a new `Buffer` using an `array` of octets.
|
||||
|
||||
|
@ -322,12 +322,12 @@ changes:
|
||||
-->
|
||||
|
||||
* `modulePath` {string} The module to run in the child.
|
||||
* `args` {Array} List of string arguments.
|
||||
* `args` {string[]} List of string arguments.
|
||||
* `options` {Object}
|
||||
* `cwd` {string} Current working directory of the child process.
|
||||
* `env` {Object} Environment key-value pairs.
|
||||
* `execPath` {string} Executable used to create the child process.
|
||||
* `execArgv` {Array} List of string arguments passed to the executable.
|
||||
* `execArgv` {string[]} List of string arguments passed to the executable.
|
||||
**Default:** `process.execArgv`.
|
||||
* `silent` {boolean} If `true`, stdin, stdout, and stderr of the child will be
|
||||
piped to the parent, otherwise they will be inherited from the parent, see
|
||||
@ -387,7 +387,7 @@ changes:
|
||||
-->
|
||||
|
||||
* `command` {string} The command to run.
|
||||
* `args` {Array} List of string arguments.
|
||||
* `args` {string[]} List of string arguments.
|
||||
* `options` {Object}
|
||||
* `cwd` {string} Current working directory of the child process.
|
||||
* `env` {Object} Environment key-value pairs.
|
||||
@ -803,7 +803,7 @@ changes:
|
||||
-->
|
||||
|
||||
* `command` {string} The command to run.
|
||||
* `args` {Array} List of string arguments.
|
||||
* `args` {string[]} List of string arguments.
|
||||
* `options` {Object}
|
||||
* `cwd` {string} Current working directory of the child process.
|
||||
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
|
||||
|
@ -713,10 +713,10 @@ changes:
|
||||
-->
|
||||
|
||||
* {Object}
|
||||
* `execArgv` {Array} List of string arguments passed to the Node.js
|
||||
* `execArgv` {string[]} List of string arguments passed to the Node.js
|
||||
executable. **Default:** `process.execArgv`.
|
||||
* `exec` {string} File path to worker file. **Default:** `process.argv[1]`.
|
||||
* `args` {Array} String arguments passed to worker.
|
||||
* `args` {string[]} String arguments passed to worker.
|
||||
**Default:** `process.argv.slice(2)`.
|
||||
* `cwd` {string} Current working directory of the worker process. **Default:**
|
||||
`undefined` (inherits from parent process).
|
||||
|
@ -479,7 +479,8 @@ the report to the **Profiles** panel of the inspector. See
|
||||
added: v8.0.0
|
||||
-->
|
||||
* `array` {Array|Object}
|
||||
* `columns` {Array}
|
||||
* `columns` {string[]} Display only selected properties of objects in the
|
||||
`array`.
|
||||
|
||||
This method does not display anything unless used in the inspector. Prints to
|
||||
`stdout` the array `array` formatted as a table.
|
||||
|
@ -2319,7 +2319,7 @@ changes:
|
||||
* `path` {string|Buffer|URL}
|
||||
* `options` {string|Object}
|
||||
* `encoding` {string} **Default:** `'utf8'`
|
||||
* Returns: {Array} An array of filenames
|
||||
* Returns: {string[]} An array of filenames
|
||||
|
||||
Synchronous readdir(3). Returns an array of filenames excluding `'.'` and
|
||||
`'..'`.
|
||||
|
@ -1103,7 +1103,7 @@ const contentType = response.getHeader('content-type');
|
||||
added: v7.7.0
|
||||
-->
|
||||
|
||||
* Returns: {Array}
|
||||
* Returns: {string[]}
|
||||
|
||||
Returns an array containing the unique names of the current outgoing headers.
|
||||
All header names are lowercase.
|
||||
@ -1538,7 +1538,7 @@ The request method as a string. Read only. Example:
|
||||
added: v0.11.6
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {string[]}
|
||||
|
||||
The raw request/response headers list exactly as they were received.
|
||||
|
||||
@ -1567,7 +1567,7 @@ console.log(request.rawHeaders);
|
||||
added: v0.11.6
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {string[]}
|
||||
|
||||
The raw request/response trailer keys and values exactly as they were
|
||||
received. Only populated at the `'end'` event.
|
||||
@ -1702,7 +1702,7 @@ Url {
|
||||
added: v0.11.8
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {string[]}
|
||||
|
||||
A list of the HTTP methods that are supported by the parser.
|
||||
|
||||
|
@ -2437,7 +2437,7 @@ The request method as a string. Read-only. Example:
|
||||
added: v8.4.0
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {string[]}
|
||||
|
||||
The raw request/response headers list exactly as they were received.
|
||||
|
||||
@ -2466,7 +2466,7 @@ console.log(request.rawHeaders);
|
||||
added: v8.4.0
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {string[]}
|
||||
|
||||
The raw request/response trailer keys and values exactly as they were
|
||||
received. Only populated at the `'end'` event.
|
||||
@ -2710,7 +2710,7 @@ const contentType = response.getHeader('content-type');
|
||||
added: v8.4.0
|
||||
-->
|
||||
|
||||
* Returns: {Array}
|
||||
* Returns: {string[]}
|
||||
|
||||
Returns an array containing the unique names of the current outgoing headers.
|
||||
All header names are lowercase.
|
||||
|
@ -648,7 +648,7 @@ changes:
|
||||
|
||||
* `request` {string} The module path to resolve.
|
||||
* `options` {Object}
|
||||
* `paths` {Array} Paths to resolve module location from. If present, these
|
||||
* `paths` {string[]} Paths to resolve module location from. If present, these
|
||||
paths are used instead of the default resolution paths. Note that each of
|
||||
these paths is used as a starting point for the module resolution algorithm,
|
||||
meaning that the `node_modules` hierarchy is checked from this location.
|
||||
@ -663,7 +663,7 @@ added: v8.9.0
|
||||
-->
|
||||
|
||||
* `request` {string} The module path whose lookup paths are being retrieved.
|
||||
* Returns: {Array|null}
|
||||
* Returns: {string[]|null}
|
||||
|
||||
Returns an array containing the paths searched during resolution of `request` or
|
||||
null if the `request` string references a core module, for example `http` or
|
||||
@ -689,7 +689,7 @@ a global but rather local to each module.
|
||||
added: v0.1.16
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {module[]}
|
||||
|
||||
The module objects required by this one.
|
||||
|
||||
|
@ -54,7 +54,7 @@ defined are described in [OS Constants](#os_os_constants_1).
|
||||
added: v0.3.3
|
||||
-->
|
||||
|
||||
* Returns: {Array}
|
||||
* Returns: {Object[]}
|
||||
|
||||
The `os.cpus()` method returns an array of objects containing information about
|
||||
each logical CPU core.
|
||||
@ -217,7 +217,7 @@ string.
|
||||
added: v0.3.3
|
||||
-->
|
||||
|
||||
* Returns: {Array}
|
||||
* Returns: {number[]}
|
||||
|
||||
The `os.loadavg()` method returns an array containing the 1, 5, and 15 minute
|
||||
load averages.
|
||||
|
@ -396,7 +396,7 @@ The `PerformanceObserverEntryList` class is used to provide access to the
|
||||
added: v8.5.0
|
||||
-->
|
||||
|
||||
* Returns: {Array}
|
||||
* Returns: {PerformanceEntry[]}
|
||||
|
||||
Returns a list of `PerformanceEntry` objects in chronological order
|
||||
with respect to `performanceEntry.startTime`.
|
||||
@ -408,7 +408,7 @@ added: v8.5.0
|
||||
|
||||
* `name` {string}
|
||||
* `type` {string}
|
||||
* Returns: {Array}
|
||||
* Returns: {PerformanceEntry[]}
|
||||
|
||||
Returns a list of `PerformanceEntry` objects in chronological order
|
||||
with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
|
||||
@ -421,7 +421,7 @@ added: v8.5.0
|
||||
-->
|
||||
|
||||
* `type` {string}
|
||||
* Returns: {Array}
|
||||
* Returns: {PerformanceEntry[]}
|
||||
|
||||
Returns a list of `PerformanceEntry` objects in chronological order
|
||||
with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`
|
||||
@ -438,7 +438,7 @@ Disconnects the `PerformanceObserver` instance from all notifications.
|
||||
added: v8.5.0
|
||||
-->
|
||||
* `options` {Object}
|
||||
* `entryTypes` {Array} An array of strings identifying the types of
|
||||
* `entryTypes` {string[]} An array of strings identifying the types of
|
||||
`PerformanceEntry` instances the observer is interested in. If not
|
||||
provided an error will be thrown.
|
||||
* `buffered` {boolean} If true, the notification callback will be
|
||||
|
@ -432,7 +432,7 @@ console.log(`This processor architecture is ${process.arch}`);
|
||||
added: v0.1.27
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {string[]}
|
||||
|
||||
The `process.argv` property returns an array containing the command line
|
||||
arguments passed when the Node.js process was launched. The first element will
|
||||
@ -923,7 +923,7 @@ console.log(process.env.test);
|
||||
added: v0.7.7
|
||||
-->
|
||||
|
||||
* {Array}
|
||||
* {string[]}
|
||||
|
||||
The `process.execArgv` property returns the set of Node.js-specific command-line
|
||||
options passed when the Node.js process was launched. These options do not
|
||||
@ -1106,7 +1106,7 @@ Android).
|
||||
added: v0.9.4
|
||||
-->
|
||||
|
||||
* Returns: {Array}
|
||||
* Returns: {integer[]}
|
||||
|
||||
The `process.getgroups()` method returns an array with the supplementary group
|
||||
IDs. POSIX leaves it unspecified if the effective group ID is included but
|
||||
@ -1149,8 +1149,8 @@ Indicates whether a callback has been set using
|
||||
added: v0.7.6
|
||||
-->
|
||||
|
||||
* `time` {Array} The result of a previous call to `process.hrtime()`
|
||||
* Returns: {Array}
|
||||
* `time` {integer[]} The result of a previous call to `process.hrtime()`
|
||||
* Returns: {integer[]}
|
||||
|
||||
The `process.hrtime()` method returns the current high-resolution real time
|
||||
in a `[seconds, nanoseconds]` tuple Array, where `nanoseconds` is the
|
||||
@ -1633,7 +1633,7 @@ Android).
|
||||
added: v0.9.4
|
||||
-->
|
||||
|
||||
* `groups` {Array}
|
||||
* `groups` {integer[]}
|
||||
|
||||
The `process.setgroups()` method sets the supplementary group IDs for the
|
||||
Node.js process. This is a privileged operation that requires the Node.js
|
||||
|
@ -130,7 +130,7 @@ punycode.ucs2.decode('\uD834\uDF06'); // [0x1D306]
|
||||
added: v0.7.0
|
||||
-->
|
||||
|
||||
* `codePoints` {Array}
|
||||
* `codePoints` {integer[]}
|
||||
|
||||
The `punycode.ucs2.encode()` method returns a string based on an array of
|
||||
numeric code point values.
|
||||
|
@ -1534,7 +1534,7 @@ user programs.
|
||||
|
||||
#### writable.\_writev(chunks, callback)
|
||||
|
||||
* `chunks` {Array} The chunks to be written. Each chunk has following
|
||||
* `chunks` {Object[]} The chunks to be written. Each chunk has following
|
||||
format: `{ chunk: ..., encoding: ... }`.
|
||||
* `callback` {Function} A callback function (optionally with an error
|
||||
argument) to be invoked when processing is complete for the supplied chunks.
|
||||
|
@ -636,7 +636,7 @@ are no such pairs, `null` is returned.
|
||||
#### urlSearchParams.getAll(name)
|
||||
|
||||
* `name` {string}
|
||||
* Returns: {Array}
|
||||
* Returns: {string[]}
|
||||
|
||||
Returns the values of all name-value pairs whose name is `name`. If there are
|
||||
no such pairs, an empty array is returned.
|
||||
|
@ -339,7 +339,7 @@ For use inside of a custom [`deserializer._readHostObject()`][].
|
||||
|
||||
#### deserializer.readUint64()
|
||||
|
||||
* Returns: {Array}
|
||||
* Returns: {integer[]}
|
||||
|
||||
Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`
|
||||
with two 32-bit unsigned integer entries.
|
||||
|
@ -78,8 +78,11 @@ const customTypesMap = {
|
||||
'net.Server': 'net.html#net_class_net_server',
|
||||
'net.Socket': 'net.html#net_class_net_socket',
|
||||
|
||||
'module': 'modules.html#modules_the_module_object',
|
||||
|
||||
'os.constants.dlopen': 'os.html#os_dlopen_constants',
|
||||
|
||||
'PerformanceEntry': 'perf_hooks.html#perf_hooks_class_performanceentry',
|
||||
'PerformanceObserver':
|
||||
'perf_hooks.html#perf_hooks_class_performanceobserver_callback',
|
||||
'PerformanceObserverEntryList':
|
||||
|
Loading…
x
Reference in New Issue
Block a user