Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd3f948

Browse filesBrowse files
JakobJingleheimerCeres6
authored andcommitted
esm: fix jsdoc type refs to ModuleJobBase in esm/loader
Co-Authored-By: Carlos Espa <43477095+Ceres6@users.noreply.github.com> PR-URL: #56499 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 233a6a9 commit dd3f948
Copy full SHA for dd3f948

File tree

Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Open diff view settings
Collapse file

‎lib/internal/modules/esm/loader.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/loader.js
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ const { tracingChannel } = require('diagnostics_channel');
5454
const onImport = tracingChannel('module.import');
5555

5656
/**
57+
* @typedef {import('./hooks.js').HooksProxy} HooksProxy
58+
* @typedef {import('./module_job.js').ModuleJobBase} ModuleJobBase
5759
* @typedef {import('url').URL} URL
5860
*/
5961

@@ -149,6 +151,7 @@ class ModuleLoader {
149151
* to this property and failure to do so will cause undefined
150152
* behavior when invoking `import.meta.resolve`.
151153
* @see {ModuleLoader.setCustomizations}
154+
* @type {CustomizedModuleLoader}
152155
*/
153156
#customizations;
154157

@@ -202,7 +205,7 @@ class ModuleLoader {
202205
*
203206
* Calling this function alters how modules are loaded and should be
204207
* invoked with care.
205-
* @param {object} customizations
208+
* @param {CustomizedModuleLoader} customizations
206209
*/
207210
setCustomizations(customizations) {
208211
this.#customizations = customizations;
@@ -270,7 +273,7 @@ class ModuleLoader {
270273
* @param {string} [parentURL] The URL of the module where the module request is initiated.
271274
* It's undefined if it's from the root module.
272275
* @param {ImportAttributes} importAttributes Attributes from the import statement or expression.
273-
* @returns {Promise<ModuleJobBase}
276+
* @returns {Promise<ModuleJobBase>}
274277
*/
275278
async getModuleJobForImport(specifier, parentURL, importAttributes) {
276279
const resolveResult = await this.resolve(specifier, parentURL, importAttributes);
@@ -284,7 +287,7 @@ class ModuleLoader {
284287
* @param {string} specifier See {@link getModuleJobForImport}
285288
* @param {string} [parentURL] See {@link getModuleJobForImport}
286289
* @param {ImportAttributes} importAttributes See {@link getModuleJobForImport}
287-
* @returns {Promise<ModuleJobBase}
290+
* @returns {Promise<ModuleJobBase>}
288291
*/
289292
getModuleJobForRequireInImportedCJS(specifier, parentURL, importAttributes) {
290293
const resolveResult = this.resolveSync(specifier, parentURL, importAttributes);
@@ -678,7 +681,7 @@ class ModuleLoader {
678681
/**
679682
* Similar to {@link resolve}, but the results are always synchronously returned. If there are any
680683
* asynchronous resolve hooks from module.register(), it will block until the results are returned
681-
* from the loader thread for this to be synchornous.
684+
* from the loader thread for this to be synchronous.
682685
* This is here to support `import.meta.resolve()`, `require()` in imported CJS, and
683686
* `module.registerHooks()` hooks.
684687
*

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.