@@ -54,6 +54,8 @@ const { tracingChannel } = require('diagnostics_channel');
5454const 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