Skip to content

Commit cc3e430

Browse files
Trottdanielleadams
authored andcommitted
lib: use consistent types in JSDoc @returns
PR-URL: #41089 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 3406910 commit cc3e430

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

lib/assert.js

-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ function innerFail(obj) {
129129
* @param {string | Error} [message]
130130
* @param {string} [operator]
131131
* @param {Function} [stackStartFn]
132-
* @returns {never}
133132
*/
134133
function fail(actual, expected, message, operator, stackStartFn) {
135134
const argsLen = arguments.length;

lib/events.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const kMaxEventTargetListenersWarned =
7979
/**
8080
* Creates a new `EventEmitter` instance.
8181
* @param {{ captureRejections?: boolean; }} [opts]
82-
* @returns {EventEmitter}
82+
* @constructs {EventEmitter}
8383
*/
8484
function EventEmitter(opts) {
8585
EventEmitter.init.call(this, opts);

lib/fs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function access(path, mode, callback) {
239239
* directory specified by `path`.
240240
* @param {string | Buffer | URL} path
241241
* @param {number} [mode]
242-
* @returns {void | never}
242+
* @returns {void}
243243
*/
244244
function accessSync(path, mode) {
245245
path = getValidatedPath(path);

lib/internal/modules/esm/resolve.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
104104
* @param {URL} packageJSONUrl
105105
* @param {string | URL | undefined} base
106106
* @param {string} main
107-
* @returns
107+
* @returns {void}
108108
*/
109109
function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) {
110110
const format = defaultGetFormat(url);

0 commit comments

Comments
 (0)