@@ -43,6 +43,8 @@ const {
43
43
let defaultResolve , defaultLoad , defaultLoadSync , importMetaInitializer ;
44
44
45
45
/**
46
+ * @typedef {import('./hooks.js').HooksProxy } HooksProxy
47
+ * @typedef {import('./module_job.js').ModuleJobBase } ModuleJobBase
46
48
* @typedef {import('url').URL } URL
47
49
*/
48
50
@@ -138,6 +140,7 @@ class ModuleLoader {
138
140
* to this property and failure to do so will cause undefined
139
141
* behavior when invoking `import.meta.resolve`.
140
142
* @see {ModuleLoader.setCustomizations}
143
+ * @type {CustomizedModuleLoader }
141
144
*/
142
145
#customizations;
143
146
@@ -194,7 +197,7 @@ class ModuleLoader {
194
197
*
195
198
* Calling this function alters how modules are loaded and should be
196
199
* invoked with care.
197
- * @param {object } customizations
200
+ * @param {CustomizedModuleLoader } customizations
198
201
*/
199
202
setCustomizations ( customizations ) {
200
203
this . #customizations = customizations ;
@@ -227,7 +230,7 @@ class ModuleLoader {
227
230
* @param {string } [parentURL] The URL of the module where the module request is initiated.
228
231
* It's undefined if it's from the root module.
229
232
* @param {ImportAttributes } importAttributes Attributes from the import statement or expression.
230
- * @returns {Promise<ModuleJobBase }
233
+ * @returns {Promise<ModuleJobBase> }
231
234
*/
232
235
async getModuleJobForImport ( specifier , parentURL , importAttributes ) {
233
236
const resolveResult = await this . resolve ( specifier , parentURL , importAttributes ) ;
@@ -241,7 +244,7 @@ class ModuleLoader {
241
244
* @param {string } specifier See {@link getModuleJobForImport}
242
245
* @param {string } [parentURL] See {@link getModuleJobForImport}
243
246
* @param {ImportAttributes } importAttributes See {@link getModuleJobForImport}
244
- * @returns {Promise<ModuleJobBase }
247
+ * @returns {Promise<ModuleJobBase> }
245
248
*/
246
249
getModuleJobForRequireInImportedCJS ( specifier , parentURL , importAttributes ) {
247
250
const resolveResult = this . resolveSync ( specifier , parentURL , importAttributes ) ;
@@ -607,7 +610,7 @@ class ModuleLoader {
607
610
/**
608
611
* Similar to {@link resolve}, but the results are always synchronously returned. If there are any
609
612
* asynchronous resolve hooks from module.register(), it will block until the results are returned
610
- * from the loader thread for this to be synchornous .
613
+ * from the loader thread for this to be synchronous .
611
614
* This is here to support `import.meta.resolve()`, `require()` in imported CJS, and
612
615
* future synchronous hooks.
613
616
*
0 commit comments