| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 233a6a9 commit dd3f948
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,6 +54,8 @@ const { tracingChannel } = require('diagnostics_channel'); | |||
| 54 | 54 | const onImport = tracingChannel('module.import'); | |
| 55 | 55 | ||
| 56 | 56 | /** | |
| 57 | + * @typedef {import('./hooks.js').HooksProxy} HooksProxy | ||
| 58 | + * @typedef {import('./module_job.js').ModuleJobBase} ModuleJobBase | ||
| 57 | 59 | * @typedef {import('url').URL} URL | |
| 58 | 60 | */ | |
| 59 | 61 | ||
@@ -149,6 +151,7 @@ class ModuleLoader { | |||
| 149 | 151 | * to this property and failure to do so will cause undefined | |
| 150 | 152 | * behavior when invoking `import.meta.resolve`. | |
| 151 | 153 | * @see {ModuleLoader.setCustomizations} | |
| 154 | + * @type {CustomizedModuleLoader} | ||
| 152 | 155 | */ | |
| 153 | 156 | #customizations; | |
| 154 | 157 | ||
@@ -202,7 +205,7 @@ class ModuleLoader { | |||
| 202 | 205 | * | |
| 203 | 206 | * Calling this function alters how modules are loaded and should be | |
| 204 | 207 | * invoked with care. | |
| 205 | - * @param {object} customizations | ||
| 208 | + * @param {CustomizedModuleLoader} customizations | ||
| 206 | 209 | */ | |
| 207 | 210 | setCustomizations(customizations) { | |
| 208 | 211 | this.#customizations = customizations; | |
@@ -270,7 +273,7 @@ class ModuleLoader { | |||
| 270 | 273 | * @param {string} [parentURL] The URL of the module where the module request is initiated. | |
| 271 | 274 | * It's undefined if it's from the root module. | |
| 272 | 275 | * @param {ImportAttributes} importAttributes Attributes from the import statement or expression. | |
| 273 | - * @returns {Promise<ModuleJobBase} | ||
| 276 | + * @returns {Promise<ModuleJobBase>} | ||
| 274 | 277 | */ | |
| 275 | 278 | async getModuleJobForImport(specifier, parentURL, importAttributes) { | |
| 276 | 279 | const resolveResult = await this.resolve(specifier, parentURL, importAttributes); | |
@@ -284,7 +287,7 @@ class ModuleLoader { | |||
| 284 | 287 | * @param {string} specifier See {@link getModuleJobForImport} | |
| 285 | 288 | * @param {string} [parentURL] See {@link getModuleJobForImport} | |
| 286 | 289 | * @param {ImportAttributes} importAttributes See {@link getModuleJobForImport} | |
| 287 | - * @returns {Promise<ModuleJobBase} | ||
| 290 | + * @returns {Promise<ModuleJobBase>} | ||
| 288 | 291 | */ | |
| 289 | 292 | getModuleJobForRequireInImportedCJS(specifier, parentURL, importAttributes) { | |
| 290 | 293 | const resolveResult = this.resolveSync(specifier, parentURL, importAttributes); | |
@@ -678,7 +681,7 @@ class ModuleLoader { | |||
| 678 | 681 | /** | |
| 679 | 682 | * Similar to {@link resolve}, but the results are always synchronously returned. If there are any | |
| 680 | 683 | * 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. | ||
| 682 | 685 | * This is here to support `import.meta.resolve()`, `require()` in imported CJS, and | |
| 683 | 686 | * `module.registerHooks()` hooks. | |
| 684 | 687 | * | |
| Back | FazBrowse Home | New Git URL |
0 commit comments