lib: use consistent types in JSDoc @returns

PR-URL: https://github.com/nodejs/node/pull/41089
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Rich Trott authored and Danielle Adams committed 2022-01-31 23:08:47 -05:00
1 parent ecc086cc7f
commit eda57a9160
4 files changed
+3 -4

No files matched your search

-1
View File
@@ -129,7 +129,6 @@ function innerFail(obj) {
* @param {string | Error} [message]
* @param {string} [operator]
* @param {Function} [stackStartFn]
* @returns {never}
*/
function fail(actual, expected, message, operator, stackStartFn) {
const argsLen = arguments.length;
+1 -1
View File
@@ -79,7 +79,7 @@ const kMaxEventTargetListenersWarned =
/**
* Creates a new `EventEmitter` instance.
* @param {{ captureRejections?: boolean; }} [opts]
* @returns {EventEmitter}
* @constructs {EventEmitter}
*/
function EventEmitter(opts) {
EventEmitter.init.call(this, opts);
+1 -1
View File
@@ -239,7 +239,7 @@ function access(path, mode, callback) {
* directory specified by `path`.
* @param {string | Buffer | URL} path
* @param {number} [mode]
* @returns {void | never}
* @returns {void}
*/
function accessSync(path, mode) {
path = getValidatedPath(path);
+1 -1
View File
@@ -128,7 +128,7 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, isExports, base) {
* @param {URL} packageJSONUrl
* @param {string | URL | undefined} base
* @param {string} main
* @returns
* @returns {void}
*/
function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) {
const format = defaultGetFormat(url);