@@ -48,6 +48,8 @@ const { tracingChannel } = require('diagnostics_channel');
4848const onImport = tracingChannel ( 'module.import' ) ;
4949
5050/**
51+ * @typedef {import('./hooks.js').HooksProxy } HooksProxy
52+ * @typedef {import('./module_job.js').ModuleJobBase } ModuleJobBase
5153 * @typedef {import('url').URL } URL
5254 */
5355
@@ -143,6 +145,7 @@ class ModuleLoader {
143145 * to this property and failure to do so will cause undefined
144146 * behavior when invoking `import.meta.resolve`.
145147 * @see {ModuleLoader.setCustomizations}
148+ * @type {CustomizedModuleLoader }
146149 */
147150 #customizations;
148151
@@ -196,7 +199,7 @@ class ModuleLoader {
196199 *
197200 * Calling this function alters how modules are loaded and should be
198201 * invoked with care.
199- * @param {object } customizations
202+ * @param {CustomizedModuleLoader } customizations
200203 */
201204 setCustomizations ( customizations ) {
202205 this . #customizations = customizations ;
@@ -236,7 +239,7 @@ class ModuleLoader {
236239 * @param {string } [parentURL] The URL of the module where the module request is initiated.
237240 * It's undefined if it's from the root module.
238241 * @param {ImportAttributes } importAttributes Attributes from the import statement or expression.
239- * @returns {Promise<ModuleJobBase }
242+ * @returns {Promise<ModuleJobBase> }
240243 */
241244 async getModuleJobForImport ( specifier , parentURL , importAttributes ) {
242245 const resolveResult = await this . resolve ( specifier , parentURL , importAttributes ) ;
@@ -250,7 +253,7 @@ class ModuleLoader {
250253 * @param {string } specifier See {@link getModuleJobForImport}
251254 * @param {string } [parentURL] See {@link getModuleJobForImport}
252255 * @param {ImportAttributes } importAttributes See {@link getModuleJobForImport}
253- * @returns {Promise<ModuleJobBase }
256+ * @returns {Promise<ModuleJobBase> }
254257 */
255258 getModuleJobForRequireInImportedCJS ( specifier , parentURL , importAttributes ) {
256259 const resolveResult = this . resolveSync ( specifier , parentURL , importAttributes ) ;
@@ -622,7 +625,7 @@ class ModuleLoader {
622625 /**
623626 * Similar to {@link resolve}, but the results are always synchronously returned. If there are any
624627 * asynchronous resolve hooks from module.register(), it will block until the results are returned
625- * from the loader thread for this to be synchornous .
628+ * from the loader thread for this to be synchronous .
626629 * This is here to support `import.meta.resolve()`, `require()` in imported CJS, and
627630 * future synchronous hooks.
628631 *
0 commit comments