Skip to content

Commit

Permalink
lib: use consistent types in JSDoc @returns
Browse files Browse the repository at this point in the history
PR-URL: #41089
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott authored and danielleadams committed Feb 1, 2022
1 parent ecc086c commit eda57a9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eda57a9

Please sign in to comment.