mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
tools: fix jsdoc lint
PR-URL: https://github.com/nodejs/node/pull/47789 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
parent
8587e3b369
commit
9658d84ddd
@ -374,7 +374,6 @@ function getUrlData(withBase) {
|
||||
* The 'wpt' type contains about 400 data points when `withBase` is true,
|
||||
* and 200 data points when `withBase` is false.
|
||||
* Other types contain 200 data points with or without base.
|
||||
*
|
||||
* @param {string} type Type of the data, 'wpt' or a key of `urls`
|
||||
* @param {number} e The repetition of the data, as exponent of 2
|
||||
* @param {boolean} withBase Whether to include a base URL
|
||||
|
@ -445,7 +445,6 @@ function clearDefaultTriggerAsyncId() {
|
||||
|
||||
/**
|
||||
* Sets a default top level trigger ID to be used
|
||||
*
|
||||
* @template {Array<unknown>} T
|
||||
* @template {unknown} R
|
||||
* @param {number} triggerAsyncId
|
||||
|
@ -499,7 +499,6 @@ const captureLargerStackTrace = hideStackFrames(
|
||||
* function UVException using a context object with data assembled in C++.
|
||||
* The goal is to migrate them to ERR_* errors later when compatibility is
|
||||
* not a concern.
|
||||
*
|
||||
* @param {object} ctx
|
||||
* @returns {Error}
|
||||
*/
|
||||
@ -551,7 +550,6 @@ const uvException = hideStackFrames(function uvException(ctx) {
|
||||
* This creates an error compatible with errors produced in the C++
|
||||
* This function should replace the deprecated
|
||||
* `exceptionWithHostPort()` function.
|
||||
*
|
||||
* @param {number} err - A libuv error number
|
||||
* @param {string} syscall
|
||||
* @param {string} address
|
||||
@ -591,7 +589,6 @@ const uvExceptionWithHostPort = hideStackFrames(
|
||||
|
||||
/**
|
||||
* This used to be util._errnoException().
|
||||
*
|
||||
* @param {number} err - A libuv error number
|
||||
* @param {string} syscall
|
||||
* @param {string} [original]
|
||||
@ -725,7 +722,6 @@ let maxStack_ErrorMessage;
|
||||
* Returns true if `err.name` and `err.message` are equal to engine-specific
|
||||
* values indicating max call stack size has been exceeded.
|
||||
* "Maximum call stack size exceeded" in V8.
|
||||
*
|
||||
* @param {Error} err
|
||||
* @returns {boolean}
|
||||
*/
|
||||
@ -857,7 +853,6 @@ class AbortError extends Error {
|
||||
|
||||
/**
|
||||
* This creates a generic Node.js error.
|
||||
*
|
||||
* @param {string} message The error message.
|
||||
* @param {object} errorProperties Object with additional properties to be added to the error.
|
||||
* @returns {Error}
|
||||
|
@ -235,7 +235,6 @@ async function isLocalAddress(hostname) {
|
||||
*
|
||||
* In cases where the request & response have already settled, this returns the
|
||||
* cache value synchronously.
|
||||
*
|
||||
* @param {URL} parsed
|
||||
* @param {ESModuleContext} context
|
||||
* @returns {ReturnType<typeof fetchWithRedirects>}
|
||||
|
@ -193,7 +193,6 @@ class Hooks {
|
||||
* Internally, this behaves like a backwards iterator, wherein the stack of
|
||||
* hooks starts at the top and each call to `nextResolve()` moves down 1 step
|
||||
* until it reaches the bottom or short-circuits.
|
||||
*
|
||||
* @param {string} originalSpecifier The specified URL path of the module to
|
||||
* be resolved.
|
||||
* @param {string} [parentURL] The URL path of the module's parent.
|
||||
@ -324,7 +323,6 @@ class Hooks {
|
||||
* Internally, this behaves like a backwards iterator, wherein the stack of
|
||||
* hooks starts at the top and each call to `nextLoad()` moves down 1 step
|
||||
* until it reaches the bottom or short-circuits.
|
||||
*
|
||||
* @param {URL['href']} url The URL/path of the module to be loaded
|
||||
* @param {object} context Metadata about the module
|
||||
* @returns {Promise<{ format: ModuleFormat, source: ModuleSource }>}
|
||||
|
@ -236,7 +236,6 @@ class DefaultModuleLoader {
|
||||
*
|
||||
* This method must NOT be renamed: it functions as a dynamic import on a
|
||||
* loader module.
|
||||
*
|
||||
* @param {string | string[]} specifiers Path(s) to the module.
|
||||
* @param {string} parentURL Path of the parent importing the module.
|
||||
* @param {Record<string, string>} importAssertions Validations for the
|
||||
@ -286,7 +285,6 @@ class DefaultModuleLoader {
|
||||
|
||||
/**
|
||||
* Resolve the location of the module.
|
||||
*
|
||||
* @param {string} originalSpecifier The specified URL path of the module to
|
||||
* be resolved.
|
||||
* @param {string} [parentURL] The URL path of the module's parent.
|
||||
@ -309,7 +307,6 @@ class DefaultModuleLoader {
|
||||
|
||||
/**
|
||||
* Provide source that is understood by one of Node's translators.
|
||||
*
|
||||
* @param {URL['href']} url The URL/path of the module to be loaded
|
||||
* @param {object} [context] Metadata about the module
|
||||
* @returns {Promise<{ format: ModuleFormat, source: ModuleSource }>}
|
||||
@ -354,7 +351,6 @@ class CustomizedModuleLoader extends DefaultModuleLoader {
|
||||
|
||||
/**
|
||||
* Resolve the location of the module.
|
||||
*
|
||||
* @param {string} originalSpecifier The specified URL path of the module to
|
||||
* be resolved.
|
||||
* @param {string} [parentURL] The URL path of the module's parent.
|
||||
@ -389,7 +385,6 @@ class CustomizedModuleLoader extends DefaultModuleLoader {
|
||||
|
||||
/**
|
||||
* Provide source that is understood by one of Node's translators.
|
||||
*
|
||||
* @param {URL['href']} url The URL/path of the module to be loaded
|
||||
* @param {object} [context] Metadata about the module
|
||||
* @returns {Promise<{ format: ModuleFormat, source: ModuleSource }>}
|
||||
|
@ -314,7 +314,6 @@ const {
|
||||
* Because these functions are used by `makeSafe`, which is exposed on the
|
||||
* `primordials` object, it's important to use const references to the
|
||||
* primordials that they use.
|
||||
*
|
||||
* @template {Iterable} T
|
||||
* @template {*} TReturn
|
||||
* @template {*} TNext
|
||||
|
@ -418,7 +418,6 @@ class Manifest {
|
||||
* the prototype to `null` for values or by running prior to any user code.
|
||||
*
|
||||
* `manifestURL` is a URL to resolve relative locations against.
|
||||
*
|
||||
* @param {object} obj
|
||||
* @param {string} manifestHREF
|
||||
*/
|
||||
|
@ -692,7 +692,6 @@ ObjectDefineProperties(URLSearchParams.prototype, {
|
||||
*
|
||||
* We use `href` and `protocol` as they are the only properties that are
|
||||
* easy to retrieve and calculate due to the lazy nature of the getters.
|
||||
*
|
||||
* @param {*} self
|
||||
* @returns {self is URL}
|
||||
*/
|
||||
|
@ -301,7 +301,6 @@ function getUserOptions(ctx, isCrossContext) {
|
||||
/**
|
||||
* Echos the value of any input. Tries to print the value out
|
||||
* in the best way possible given the different types.
|
||||
*
|
||||
* @param {any} value The value to print out.
|
||||
* @param {object} opts Optional options object that alters the output.
|
||||
*/
|
||||
|
@ -73,7 +73,6 @@ function getMainArgs() {
|
||||
|
||||
/**
|
||||
* In strict mode, throw for possible usage errors like --foo --bar
|
||||
*
|
||||
* @param {object} token - from tokens as available from parseArgs
|
||||
*/
|
||||
function checkOptionLikeValue(token) {
|
||||
@ -91,7 +90,6 @@ To specify an option argument starting with a dash use ${example}.`;
|
||||
|
||||
/**
|
||||
* In strict mode, throw for usage errors.
|
||||
*
|
||||
* @param {object} config - from config passed to parseArgs
|
||||
* @param {object} token - from tokens as available from parseArgs
|
||||
*/
|
||||
@ -116,7 +114,6 @@ function checkOptionUsage(config, token) {
|
||||
|
||||
/**
|
||||
* Store the option value in `values`.
|
||||
*
|
||||
* @param {string} longOption - long option name e.g. 'foo'
|
||||
* @param {string|undefined} optionValue - value from user args
|
||||
* @param {object} options - option configs, from parseArgs({ options })
|
||||
@ -148,7 +145,6 @@ function storeOption(longOption, optionValue, options, values) {
|
||||
|
||||
/**
|
||||
* Store the default option value in `values`.
|
||||
*
|
||||
* @param {string} longOption - long option name e.g. 'foo'
|
||||
* @param {string
|
||||
* | boolean
|
||||
@ -169,7 +165,6 @@ function storeDefaultOption(longOption, optionValue, values) {
|
||||
* - option (along with value, if any)
|
||||
* - positional
|
||||
* - option-terminator
|
||||
*
|
||||
* @param {string[]} args - from parseArgs({ args }) or mainArgs
|
||||
* @param {object} options - option configs, from parseArgs({ options })
|
||||
*/
|
||||
|
@ -173,7 +173,6 @@ function findLongOptionForShort(shortOption, options) {
|
||||
/**
|
||||
* Check if the given option includes a default value
|
||||
* and that option has not been set by the input args.
|
||||
*
|
||||
* @param {string} longOption - long option name e.g. 'foo'
|
||||
* @param {object} optionConfig - the option configuration properties
|
||||
* @param {object} values - option values returned in `values` by parseArgs
|
||||
|
@ -61,7 +61,6 @@ const modeDesc = 'must be a 32-bit unsigned integer or an octal string';
|
||||
* converted to 32-bit unsigned integers or non-negative signed integers in the
|
||||
* C++ land, but any value higher than 0o777 will result in platform-specific
|
||||
* behaviors.
|
||||
*
|
||||
* @param {*} value Values to be validated
|
||||
* @param {string} name Name of the argument
|
||||
* @param {number} [def] If specified, will be returned for invalid values
|
||||
|
@ -126,7 +126,6 @@ function loadavg() {
|
||||
/**
|
||||
* Returns an array of objects containing information about each
|
||||
* logical CPU core.
|
||||
*
|
||||
* @returns {Array<{
|
||||
* model: string,
|
||||
* speed: number,
|
||||
|
@ -54,7 +54,6 @@ const kNativeDecoder = Symbol('kNativeDecoder');
|
||||
// modules monkey-patch it to support additional encodings
|
||||
/**
|
||||
* Normalize encoding notation
|
||||
*
|
||||
* @param {string} enc
|
||||
* @returns {"utf8" | "utf16le" | "hex" | "ascii"
|
||||
* | "base64" | "latin1" | "base64url"}
|
||||
@ -78,7 +77,6 @@ for (let i = 0; i < encodings.length; ++i)
|
||||
* StringDecoder provides an interface for efficiently splitting a series of
|
||||
* buffers into a series of JS strings without breaking apart multi-byte
|
||||
* characters.
|
||||
*
|
||||
* @param {string} [encoding=utf-8]
|
||||
*/
|
||||
function StringDecoder(encoding) {
|
||||
@ -90,7 +88,6 @@ function StringDecoder(encoding) {
|
||||
/**
|
||||
* Returns a decoded string, omitting any incomplete multi-bytes
|
||||
* characters at the end of the Buffer, or TypedArray, or DataView
|
||||
*
|
||||
* @param {string | Buffer | TypedArray | DataView} buf
|
||||
* @returns {string}
|
||||
* @throws {TypeError} Throws when buf is not in one of supported types
|
||||
@ -112,7 +109,6 @@ StringDecoder.prototype.write = function write(buf) {
|
||||
* Returns any remaining input stored in the internal buffer as a string.
|
||||
* After end() is called, the stringDecoder object can be reused for new
|
||||
* input.
|
||||
*
|
||||
* @param {string | Buffer | TypedArray | DataView} [buf]
|
||||
* @returns {string}
|
||||
*/
|
||||
|
@ -231,7 +231,6 @@ function log(...args) {
|
||||
* during bootstrapping this function needs to be rewritten using some native
|
||||
* functions as prototype setup using normal JavaScript does not work as
|
||||
* expected during bootstrapping (see mirror.js in r114903).
|
||||
*
|
||||
* @param {Function} ctor Constructor function which needs to inherit the
|
||||
* prototype.
|
||||
* @param {Function} superCtor Constructor function to inherit prototype from.
|
||||
|
@ -5,7 +5,6 @@ const assert = require('assert');
|
||||
/**
|
||||
* Checks the expected invocations against the invocations that actually
|
||||
* occurred.
|
||||
*
|
||||
* @name checkInvocations
|
||||
* @function
|
||||
* @param {object} activity including timestamps for each life time event,
|
||||
|
@ -48,7 +48,6 @@ async function assertSnapshot(actual, filename = process.argv[1]) {
|
||||
* both of which can be used as an example for writing your own
|
||||
* compose multiple transforms by passing them as arguments to the transform function:
|
||||
* assertSnapshot.transform(assertSnapshot.replaceStackTrace, assertSnapshot.replaceWindowsLineEndings)
|
||||
*
|
||||
* @param {string} filename
|
||||
* @param {function(string): string} [transform]
|
||||
* @returns {Promise<void>}
|
||||
|
@ -780,7 +780,6 @@ class WPTRunner {
|
||||
/**
|
||||
* Report the status of each specific test case (there could be multiple
|
||||
* in one test file).
|
||||
*
|
||||
* @param {WPTTestSpec} spec
|
||||
* @param {Test} test The Test object returned by WPT harness
|
||||
*/
|
||||
@ -795,7 +794,6 @@ class WPTRunner {
|
||||
|
||||
/**
|
||||
* Report the status of each WPT test (one per file)
|
||||
*
|
||||
* @param {WPTTestSpec} spec
|
||||
* @param {object} harnessStatus - The status object returned by WPT harness.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user