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 <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Trott authored and danielleadams committed Dec 13, 2021
1 parent 3406910 commit cc3e430
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 @@ -104,7 +104,7 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, 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 cc3e430

Please sign in to comment.