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:
Vse Mozhet Byt 2018-04-09 15:25:04 +03:00
parent 321c178faa
commit dff214153f
16 changed files with 41 additions and 36 deletions

View File

@ -712,7 +712,8 @@ changes:
description: The elements of `list` can now be `Uint8Array`s. 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` * `totalLength` {integer} Total length of the `Buffer` instances in `list`
when concatenated. when concatenated.
* Returns: {Buffer} * Returns: {Buffer}
@ -756,7 +757,7 @@ console.log(bufA.length);
added: v5.10.0 added: v5.10.0
--> -->
* `array` {Array} * `array` {integer[]}
Allocates a new `Buffer` using an `array` of octets. Allocates a new `Buffer` using an `array` of octets.

View File

@ -322,12 +322,12 @@ changes:
--> -->
* `modulePath` {string} The module to run in the child. * `modulePath` {string} The module to run in the child.
* `args` {Array} List of string arguments. * `args` {string[]} List of string arguments.
* `options` {Object} * `options` {Object}
* `cwd` {string} Current working directory of the child process. * `cwd` {string} Current working directory of the child process.
* `env` {Object} Environment key-value pairs. * `env` {Object} Environment key-value pairs.
* `execPath` {string} Executable used to create the child process. * `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`. **Default:** `process.execArgv`.
* `silent` {boolean} If `true`, stdin, stdout, and stderr of the child will be * `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 piped to the parent, otherwise they will be inherited from the parent, see
@ -387,7 +387,7 @@ changes:
--> -->
* `command` {string} The command to run. * `command` {string} The command to run.
* `args` {Array} List of string arguments. * `args` {string[]} List of string arguments.
* `options` {Object} * `options` {Object}
* `cwd` {string} Current working directory of the child process. * `cwd` {string} Current working directory of the child process.
* `env` {Object} Environment key-value pairs. * `env` {Object} Environment key-value pairs.
@ -803,7 +803,7 @@ changes:
--> -->
* `command` {string} The command to run. * `command` {string} The command to run.
* `args` {Array} List of string arguments. * `args` {string[]} List of string arguments.
* `options` {Object} * `options` {Object}
* `cwd` {string} Current working directory of the child process. * `cwd` {string} Current working directory of the child process.
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin * `input` {string|Buffer|Uint8Array} The value which will be passed as stdin

View File

@ -713,10 +713,10 @@ changes:
--> -->
* {Object} * {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`. executable. **Default:** `process.execArgv`.
* `exec` {string} File path to worker file. **Default:** `process.argv[1]`. * `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)`. **Default:** `process.argv.slice(2)`.
* `cwd` {string} Current working directory of the worker process. **Default:** * `cwd` {string} Current working directory of the worker process. **Default:**
`undefined` (inherits from parent process). `undefined` (inherits from parent process).

View File

@ -479,7 +479,8 @@ the report to the **Profiles** panel of the inspector. See
added: v8.0.0 added: v8.0.0
--> -->
* `array` {Array|Object} * `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 This method does not display anything unless used in the inspector. Prints to
`stdout` the array `array` formatted as a table. `stdout` the array `array` formatted as a table.

View File

@ -2319,7 +2319,7 @@ changes:
* `path` {string|Buffer|URL} * `path` {string|Buffer|URL}
* `options` {string|Object} * `options` {string|Object}
* `encoding` {string} **Default:** `'utf8'` * `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 Synchronous readdir(3). Returns an array of filenames excluding `'.'` and
`'..'`. `'..'`.

View File

@ -1103,7 +1103,7 @@ const contentType = response.getHeader('content-type');
added: v7.7.0 added: v7.7.0
--> -->
* Returns: {Array} * Returns: {string[]}
Returns an array containing the unique names of the current outgoing headers. Returns an array containing the unique names of the current outgoing headers.
All header names are lowercase. All header names are lowercase.
@ -1538,7 +1538,7 @@ The request method as a string. Read only. Example:
added: v0.11.6 added: v0.11.6
--> -->
* {Array} * {string[]}
The raw request/response headers list exactly as they were received. The raw request/response headers list exactly as they were received.
@ -1567,7 +1567,7 @@ console.log(request.rawHeaders);
added: v0.11.6 added: v0.11.6
--> -->
* {Array} * {string[]}
The raw request/response trailer keys and values exactly as they were The raw request/response trailer keys and values exactly as they were
received. Only populated at the `'end'` event. received. Only populated at the `'end'` event.
@ -1702,7 +1702,7 @@ Url {
added: v0.11.8 added: v0.11.8
--> -->
* {Array} * {string[]}
A list of the HTTP methods that are supported by the parser. A list of the HTTP methods that are supported by the parser.

View File

@ -2437,7 +2437,7 @@ The request method as a string. Read-only. Example:
added: v8.4.0 added: v8.4.0
--> -->
* {Array} * {string[]}
The raw request/response headers list exactly as they were received. The raw request/response headers list exactly as they were received.
@ -2466,7 +2466,7 @@ console.log(request.rawHeaders);
added: v8.4.0 added: v8.4.0
--> -->
* {Array} * {string[]}
The raw request/response trailer keys and values exactly as they were The raw request/response trailer keys and values exactly as they were
received. Only populated at the `'end'` event. received. Only populated at the `'end'` event.
@ -2710,7 +2710,7 @@ const contentType = response.getHeader('content-type');
added: v8.4.0 added: v8.4.0
--> -->
* Returns: {Array} * Returns: {string[]}
Returns an array containing the unique names of the current outgoing headers. Returns an array containing the unique names of the current outgoing headers.
All header names are lowercase. All header names are lowercase.

View File

@ -648,7 +648,7 @@ changes:
* `request` {string} The module path to resolve. * `request` {string} The module path to resolve.
* `options` {Object} * `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 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, these paths is used as a starting point for the module resolution algorithm,
meaning that the `node_modules` hierarchy is checked from this location. 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. * `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 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 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 added: v0.1.16
--> -->
* {Array} * {module[]}
The module objects required by this one. The module objects required by this one.

View File

@ -54,7 +54,7 @@ defined are described in [OS Constants](#os_os_constants_1).
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {Array} * Returns: {Object[]}
The `os.cpus()` method returns an array of objects containing information about The `os.cpus()` method returns an array of objects containing information about
each logical CPU core. each logical CPU core.
@ -217,7 +217,7 @@ string.
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {Array} * Returns: {number[]}
The `os.loadavg()` method returns an array containing the 1, 5, and 15 minute The `os.loadavg()` method returns an array containing the 1, 5, and 15 minute
load averages. load averages.

View File

@ -396,7 +396,7 @@ The `PerformanceObserverEntryList` class is used to provide access to the
added: v8.5.0 added: v8.5.0
--> -->
* Returns: {Array} * Returns: {PerformanceEntry[]}
Returns a list of `PerformanceEntry` objects in chronological order Returns a list of `PerformanceEntry` objects in chronological order
with respect to `performanceEntry.startTime`. with respect to `performanceEntry.startTime`.
@ -408,7 +408,7 @@ added: v8.5.0
* `name` {string} * `name` {string}
* `type` {string} * `type` {string}
* Returns: {Array} * Returns: {PerformanceEntry[]}
Returns a list of `PerformanceEntry` objects in chronological order Returns a list of `PerformanceEntry` objects in chronological order
with respect to `performanceEntry.startTime` whose `performanceEntry.name` is with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
@ -421,7 +421,7 @@ added: v8.5.0
--> -->
* `type` {string} * `type` {string}
* Returns: {Array} * Returns: {PerformanceEntry[]}
Returns a list of `PerformanceEntry` objects in chronological order Returns a list of `PerformanceEntry` objects in chronological order
with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`
@ -438,7 +438,7 @@ Disconnects the `PerformanceObserver` instance from all notifications.
added: v8.5.0 added: v8.5.0
--> -->
* `options` {Object} * `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 `PerformanceEntry` instances the observer is interested in. If not
provided an error will be thrown. provided an error will be thrown.
* `buffered` {boolean} If true, the notification callback will be * `buffered` {boolean} If true, the notification callback will be

View File

@ -432,7 +432,7 @@ console.log(`This processor architecture is ${process.arch}`);
added: v0.1.27 added: v0.1.27
--> -->
* {Array} * {string[]}
The `process.argv` property returns an array containing the command line The `process.argv` property returns an array containing the command line
arguments passed when the Node.js process was launched. The first element will 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 added: v0.7.7
--> -->
* {Array} * {string[]}
The `process.execArgv` property returns the set of Node.js-specific command-line 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 options passed when the Node.js process was launched. These options do not
@ -1106,7 +1106,7 @@ Android).
added: v0.9.4 added: v0.9.4
--> -->
* Returns: {Array} * Returns: {integer[]}
The `process.getgroups()` method returns an array with the supplementary group The `process.getgroups()` method returns an array with the supplementary group
IDs. POSIX leaves it unspecified if the effective group ID is included but 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 added: v0.7.6
--> -->
* `time` {Array} The result of a previous call to `process.hrtime()` * `time` {integer[]} The result of a previous call to `process.hrtime()`
* Returns: {Array} * Returns: {integer[]}
The `process.hrtime()` method returns the current high-resolution real time The `process.hrtime()` method returns the current high-resolution real time
in a `[seconds, nanoseconds]` tuple Array, where `nanoseconds` is the in a `[seconds, nanoseconds]` tuple Array, where `nanoseconds` is the
@ -1633,7 +1633,7 @@ Android).
added: v0.9.4 added: v0.9.4
--> -->
* `groups` {Array} * `groups` {integer[]}
The `process.setgroups()` method sets the supplementary group IDs for the The `process.setgroups()` method sets the supplementary group IDs for the
Node.js process. This is a privileged operation that requires the Node.js Node.js process. This is a privileged operation that requires the Node.js

View File

@ -130,7 +130,7 @@ punycode.ucs2.decode('\uD834\uDF06'); // [0x1D306]
added: v0.7.0 added: v0.7.0
--> -->
* `codePoints` {Array} * `codePoints` {integer[]}
The `punycode.ucs2.encode()` method returns a string based on an array of The `punycode.ucs2.encode()` method returns a string based on an array of
numeric code point values. numeric code point values.

View File

@ -1534,7 +1534,7 @@ user programs.
#### writable.\_writev(chunks, callback) #### 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: ... }`. format: `{ chunk: ..., encoding: ... }`.
* `callback` {Function} A callback function (optionally with an error * `callback` {Function} A callback function (optionally with an error
argument) to be invoked when processing is complete for the supplied chunks. argument) to be invoked when processing is complete for the supplied chunks.

View File

@ -636,7 +636,7 @@ are no such pairs, `null` is returned.
#### urlSearchParams.getAll(name) #### urlSearchParams.getAll(name)
* `name` {string} * `name` {string}
* Returns: {Array} * Returns: {string[]}
Returns the values of all name-value pairs whose name is `name`. If there are Returns the values of all name-value pairs whose name is `name`. If there are
no such pairs, an empty array is returned. no such pairs, an empty array is returned.

View File

@ -339,7 +339,7 @@ For use inside of a custom [`deserializer._readHostObject()`][].
#### deserializer.readUint64() #### deserializer.readUint64()
* Returns: {Array} * Returns: {integer[]}
Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`
with two 32-bit unsigned integer entries. with two 32-bit unsigned integer entries.

View File

@ -78,8 +78,11 @@ const customTypesMap = {
'net.Server': 'net.html#net_class_net_server', 'net.Server': 'net.html#net_class_net_server',
'net.Socket': 'net.html#net_class_net_socket', 'net.Socket': 'net.html#net_class_net_socket',
'module': 'modules.html#modules_the_module_object',
'os.constants.dlopen': 'os.html#os_dlopen_constants', 'os.constants.dlopen': 'os.html#os_dlopen_constants',
'PerformanceEntry': 'perf_hooks.html#perf_hooks_class_performanceentry',
'PerformanceObserver': 'PerformanceObserver':
'perf_hooks.html#perf_hooks_class_performanceobserver_callback', 'perf_hooks.html#perf_hooks_class_performanceobserver_callback',
'PerformanceObserverEntryList': 'PerformanceObserverEntryList':