Skip to content

Commit

Permalink
fixup! lib: fix JSDoc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Nov 2, 2022
1 parent 30adf34 commit 1ec421e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/modules/esm/assert.js
Expand Up @@ -68,7 +68,7 @@ function validateAssertions(url, format,
if (!ObjectPrototypeHasOwnProperty(importAssertions, 'type')) {
return true;
}
return handleInvalidType(url, importAssertions.type);
return createHandleInvalidTypeError(url, importAssertions.type);

case importAssertions.type:
// The asserted type is the valid type for this format.
Expand All @@ -81,7 +81,7 @@ function validateAssertions(url, format,
// `type` wasn't specified at all.
throw new ERR_IMPORT_ASSERTION_TYPE_MISSING(url, validType);
}
return handleInvalidType(url, importAssertions.type);
return createHandleInvalidTypeError(url, importAssertions.type);
}
}

Expand All @@ -90,7 +90,7 @@ function validateAssertions(url, format,
* @param {string} url The resolved URL for the module to be imported
* @param {string} type The value of the import assertion `type` property
*/
function handleInvalidType(url, type) {
function createHandleInvalidTypeError(url, type) {
// `type` might have not been a string.
validateString(type, 'type');

Expand Down

0 comments on commit 1ec421e

Please sign in to comment.